Code

format string protection/clean up (CVE-2007-1463, CVE-2007-1464)
[inkscape.git] / src / extension / internal / pov-out.cpp
index 54d49a79a35e546daa656a3e49c6d7ec7e3fa180..7318fa78457873bbcaa21388f5cbeb33c333ab6d 100644 (file)
@@ -124,9 +124,10 @@ void PovOutput::out(char *fmt, ...)
 {
     va_list args;
     va_start(args, fmt);
-    g_vsnprintf(fmtbuf, 4096, fmt, args);
+    gchar * output = g_strdup_vprintf(fmt, args);
     va_end(args);
-    outbuf.append(fmtbuf);
+    outbuf.append(output);
+    g_free(output);
 }