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>
This commit is contained in:
parent
02d6d05339
commit
b6671787db
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue