Code

format string protection/clean up (CVE-2007-1463, CVE-2007-1464)
[inkscape.git] / src / util / format.h
index 3066173e1aad984632efa7f5e8c570d974217a9b..80d79c28a4467b1502eaf6331587cf6b6c82534c 100644 (file)
@@ -13,7 +13,7 @@
 #define SEEN_INKSCAPE_UTIL_FORMAT_H
 
 #include <stdarg.h>
-#include <glib/gstrfuncs.h>
+#include <glib.h>
 #include "util/share.h"
 
 namespace Inkscape {
@@ -27,6 +27,8 @@ inline ptr_shared<char> vformat(char const *format, va_list args) {
     return result;
 }
 
+       // needed since G_GNUC_PRINTF can only be used on a declaration
+       ptr_shared<char> format(char const *format, ...) G_GNUC_PRINTF(1,2);
 inline ptr_shared<char> format(char const *format, ...) {
     va_list args;