[FFmpeg-cvslog] flashsv2_prime: check block before using it.

Michael Niedermayer git at videolan.org
Sat Dec 15 01:07:07 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 15 00:19:20 2012 +0100| [b6671787db5b5d53e065f88e52a35d94cb50504c] | committer: Michael Niedermayer

flashsv2_prime: check block before using it.

Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/flashsv.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 8448a8c..7855416 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -126,6 +126,9 @@ static int flashsv2_prime(FlashSVContext *s, uint8_t *src, int size)
     z_stream zs;
     int zret; // Zlib return code
 
+    if (!src)
+        return AVERROR_INVALIDDATA;
+
     zs.zalloc = NULL;
     zs.zfree  = NULL;
     zs.opaque = NULL;



More information about the ffmpeg-cvslog mailing list