From cb71415364c1653cbabf63d1edeb8fbd28554652 Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 7 Sep 2018 22:48:31 -0500 Subject: RTCCertificate.cpp: output truncated before the last format character Fixes compiler warnings when building with GCC 7+ --- dom/media/webrtc/RTCCertificate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dom') diff --git a/dom/media/webrtc/RTCCertificate.cpp b/dom/media/webrtc/RTCCertificate.cpp index 3f778bcbb..9f5e27c56 100644 --- a/dom/media/webrtc/RTCCertificate.cpp +++ b/dom/media/webrtc/RTCCertificate.cpp @@ -74,7 +74,7 @@ private: char buf[sizeof(randomName) * 2 + 4]; PL_strncpy(buf, "CN=", 3); for (size_t i = 0; i < sizeof(randomName); ++i) { - snprintf(&buf[i * 2 + 3], 2, "%.2x", randomName[i]); + snprintf(&buf[i * 2 + 3], 3, "%.2x", randomName[i]); } buf[sizeof(buf) - 1] = '\0'; -- cgit v1.2.3