Bug 1371626 - Fix a format-overflow issue with gcc 7.1 r=bsmedberg
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 09 Jun 2017 14:40:13 +0200
changeset 363299 7e925cbe797684129a52ecee13a1d7b38b1b2141
parent 363298 f759d63d25b98c4e73a375fa2752b5be442e2435
child 363300 2499565216fcb80eeef4069f604fc2dc40f7bf76
push id32002
push userarchaeopteryx@coole-files.de
push dateSat, 10 Jun 2017 09:14:38 +0000
treeherdermozilla-central@a305f9e66fa5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1371626
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1371626 - Fix a format-overflow issue with gcc 7.1 r=bsmedberg MozReview-Commit-ID: FdowbpMrqQN
dom/plugins/test/testplugin/nptest.cpp
--- a/dom/plugins/test/testplugin/nptest.cpp
+++ b/dom/plugins/test/testplugin/nptest.cpp
@@ -522,17 +522,17 @@ static void sendBufferToFrame(NPP instan
         outbuf.replace(i, 1, "");
         i -= 1;
       }
       else {
         int ascii = outbuf[i];
         if (!((ascii >= ',' && ascii <= ';') ||
               (ascii >= 'A' && ascii <= 'Z') ||
               (ascii >= 'a' && ascii <= 'z'))) {
-          char hex[8];
+          char hex[10];
           sprintf(hex, "%%%x", ascii);
           outbuf.replace(i, 1, hex);
           i += 2;
         }
       }
     }
 
     NPError err = NPN_GetURL(instance, outbuf.c_str(),