mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/smacker: Check if bufs has been allocated before use
Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
93648ee47b
commit
8be56e464b
|
@ -351,7 +351,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
smk->cur_frame++;
|
||||
smk->nextpos = avio_tell(s->pb);
|
||||
} else {
|
||||
if (smk->stream_id[smk->curstream] < 0)
|
||||
if (smk->stream_id[smk->curstream] < 0 || !smk->bufs[smk->curstream])
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (av_new_packet(pkt, smk->buf_sizes[smk->curstream]))
|
||||
return AVERROR(ENOMEM);
|
||||
|
|
Loading…
Reference in New Issue