mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-11 06:58:18 +00:00
read_gab2_sub: fix 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
02b238186a
commit
028cc42a16
@ -817,7 +817,7 @@ static int avi_read_header(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int read_gab2_sub(AVStream *st, AVPacket *pkt) {
|
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];
|
uint8_t desc[256];
|
||||||
int score = AVPROBE_SCORE_MAX / 2, ret;
|
int score = AVPROBE_SCORE_MAX / 2, ret;
|
||||||
AVIStream *ast = st->priv_data;
|
AVIStream *ast = st->priv_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user