Browse Source

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>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
b6671787db
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/flashsv.c

+ 3
- 0
libavcodec/flashsv.c View File

@@ -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…
Cancel
Save