diff options
Diffstat (limited to 'src/string.cpp')
-rw-r--r-- | src/string.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/string.cpp b/src/string.cpp index 8a95d7b6f..63288e431 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -32,7 +32,10 @@ #include "gfx_func.h" #endif /* WITH_ICU */ +/* The function vsnprintf is used internally to perform the required formatting + * tasks. As such this one must be allowed, and makes sure it's terminated. */ #include "safeguards.h" +#undef vsnprintf /** * Safer implementation of vsnprintf; same as vsnprintf except: @@ -44,7 +47,7 @@ * @param ap the list of arguments for the format * @return the number of added characters */ -static int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap) +int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap) { ptrdiff_t diff = last - str; if (diff < 0) return 0; |