From 050973b503346c67f599b634983ffa579926ac4c Mon Sep 17 00:00:00 2001 From: trav90 Date: Sun, 4 Mar 2018 15:31:36 -0600 Subject: Fix a truncation leading to an error with GCC 7 --- toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolkit') diff --git a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp b/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp index 79e21cc89..009ba917a 100644 --- a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp +++ b/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp @@ -232,8 +232,8 @@ 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; } -- cgit v1.2.3