[FFmpeg-cvslog] Fix apparently exploitable race condition.

Michael Niedermayer git at videolan.org
Tue Apr 26 12:37:18 CEST 2011


ffmpeg | branch: release/0.5 | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 25 02:24:32 2011 +0100| [24cd7c5df78c53c1d1a36b81fb130594e84b3f12] | committer: Michael Niedermayer

Fix apparently exploitable race condition.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24cd7c5df78c53c1d1a36b81fb130594e84b3f12
---

 libavutil/log.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavutil/log.c b/libavutil/log.c
index 4bb9652..fb773d0 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -33,7 +33,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];
     AVClass* avc= ptr ? *(AVClass**)ptr : NULL;
     if(level>av_log_level)
         return;



More information about the ffmpeg-cvslog mailing list