fixed a security bug in logging, added basic xml support to as3 compiler
[swftools.git] / lib / as3 / files.c
index 5390027..eaa5a8c 100644 (file)
@@ -25,6 +25,7 @@
 #include <memory.h>
 #include <errno.h>
 #include "files.h"
+#include "common.h"
 #include "tokenizer.h"
 
 static int verbose = 0;
@@ -36,7 +37,7 @@ static void dbg(const char*format, ...)
     if(!verbose)
        return;
     va_start(arglist, format);
-    vsprintf(buf, format, arglist);
+    vsnprintf(buf, sizeof(buf)-1, format, arglist);
     va_end(arglist);
     l = strlen(buf);
     while(l && buf[l-1]=='\n') {