aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flashsv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-15 00:19:20 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-15 00:19:52 +0100
commitb6671787db5b5d53e065f88e52a35d94cb50504c (patch)
tree82307dcc54a9a6265239d4757209f1d64eac5601 /libavcodec/flashsv.c
parent02d6d053396626ff5b3390e48a9933e0d4164b28 (diff)
downloadffmpeg-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>
Diffstat (limited to 'libavcodec/flashsv.c')
-rw-r--r--libavcodec/flashsv.c3
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;