diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-12 14:27:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-12 17:46:05 +0100 |
commit | 028cc42a1638e6f93a857f11c2568d1c3a51e612 (patch) | |
tree | ec977aa4f78022ec1f42e9d70adc593a619d6be4 | |
parent | 02b238186a23d61859d9be8ca9356052f0216220 (diff) | |
download | ffmpeg-028cc42a1638e6f93a857f11c2568d1c3a51e612.tar.gz |
read_gab2_sub: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/avidec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 974071cdda..7436b63cfb 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -817,7 +817,7 @@ static int avi_read_header(AVFormatContext *s) } static int read_gab2_sub(AVStream *st, AVPacket *pkt) { - if (!strcmp(pkt->data, "GAB2") && AV_RL16(pkt->data+5) == 2) { + if (pkt->data && !strcmp(pkt->data, "GAB2") && AV_RL16(pkt->data+5) == 2) { uint8_t desc[256]; int score = AVPROBE_SCORE_MAX / 2, ret; AVIStream *ast = st->priv_data; |