fixed a security bug in logging, added basic xml support to as3 compiler
[swftools.git] / lib / action / actioncompiler.c
index 8fda071..9edc590 100644 (file)
@@ -34,7 +34,7 @@ static void print_error(const char*format,...)
     int len;
     va_list arglist;
     va_start(arglist, format);
-    vsprintf(buf, format, arglist);
+    vsnprintf(buf, sizeof(buf)-1, format, arglist);
     va_end(arglist);
 
     len = strlen(buf);
@@ -50,7 +50,7 @@ static void print_warn(const char*format,...)
     int len;
     va_list arglist;
     va_start(arglist, format);
-    vsprintf(buf, format, arglist);
+    vsnprintf(buf, sizeof(buf)-1, format, arglist);
     va_end(arglist);
 
     len = strlen(buf);