From b6671787db5b5d53e065f88e52a35d94cb50504c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 15 Dec 2012 00:19:20 +0100 Subject: flashsv2_prime: check block before using it. Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- libavcodec/flashsv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/flashsv.c') 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; -- cgit v1.1