Bug 1334979 - Fix a truncation leading to an error with gcc 7 r=bbouvier
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 30 Jan 2017 10:56:59 +0100
changeset 340992 8be8dd1678a5199465a2960b982bf574deb05e9d
parent 340991 bd99ca8c230be4e574644b419b89149200aab219
child 340993 7a9666bfb431ba3f94ecbad92aea6690d39d4131
push id86615
push userkwierso@gmail.com
push dateTue, 07 Feb 2017 01:52:08 +0000
treeherdermozilla-inbound@f0453084d86e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1334979
milestone54.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 1334979 - Fix a truncation leading to an error with gcc 7 r=bbouvier MozReview-Commit-ID: Cw6h49cNetj
toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
--- a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
+++ b/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
@@ -227,18 +227,18 @@ test_finalizer_cmp_null_t(void *a, void 
 // Resource type: char*
 
 // Acquire resource i
 char*
 test_finalizer_acq_string_t(int i)
 {
   gFinalizerTestResources[i] = 1;
   if (!gFinalizerTestNames[i]) {
-    char* buf = new char[10];
-    snprintf(buf, 10, "%d", i);
+    char* buf = new char[12];
+    snprintf(buf, 12, "%d", i);
     gFinalizerTestNames[i] = buf;
     return buf;
   }
   return gFinalizerTestNames[i];
 }
 
 // Release resource i
 void