Fix apparently exploitable race condition.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 25 Mar 2011 01:24:32 +0000 (02:24 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 26 Apr 2011 10:28:46 +0000 (12:28 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/log.c

index 9a8b66e..b08072c 100644 (file)
@@ -59,7 +59,8 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
 {
     static int print_prefix=1;
     static int count;
-    static char line[1024], prev[1024];
+    static char prev[1024];
+    char line[1024];
     static const uint8_t color[]={0x41,0x41,0x11,0x03,9,9,9};
     AVClass* avc= ptr ? *(AVClass**)ptr : NULL;
     if(level>av_log_level)