summaryrefslogtreecommitdiffstats
path: root/external/cppunit/sprintf.patch.0
blob: daa4881f338419253c1d1931475724d8f324b70d (plain)
1
2
3
4
5
6
7
8
9
10
11
--- include/cppunit/TestAssert.h
+++ include/cppunit/TestAssert.h
@@ -112,7 +122,7 @@
 #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning.
        sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x); 
 #else	
-       sprintf(buffer, "%.*g", precision, x); 
+       snprintf(buffer, sizeof(buffer), "%.*g", precision, x); 
 #endif
        return buffer;
     }