Bug 1371626 - Fix a format-overflow issue with gcc 7.1 r?bsmedberg draft
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 09 Jun 2017 14:40:13 +0200
changeset 591684 9afd30fee86c18b8d0a2ab804e19bf4865e3d52d
parent 591406 f4262773c4331d4ae139be536ce278ea9aad3436
child 592568 ed32ad5fa30ae766334cedcd951b024cc75c7baf
push id63133
push userbmo:sledru@mozilla.com
push dateFri, 09 Jun 2017 12:40:55 +0000
reviewersbsmedberg
bugs1371626
milestone55.0a1
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(),