diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-15 00:19:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-15 00:19:52 +0100 |
commit | b6671787db5b5d53e065f88e52a35d94cb50504c (patch) | |
tree | 82307dcc54a9a6265239d4757209f1d64eac5601 | |
parent | 02d6d053396626ff5b3390e48a9933e0d4164b28 (diff) | |
download | ffmpeg-b6671787db5b5d53e065f88e52a35d94cb50504c.tar.gz |
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@gmx.at>
-rw-r--r-- | libavcodec/flashsv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 8448a8c285..7855416567 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; |