libreoffice/external/cppunit/sprintf.patch.0

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
430 B
Plaintext
Raw Normal View History

--- 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;
}