Commit d98364ed authored by Paul B Mahol's avatar Paul B Mahol

smush: check audio packet size

Fixes null pointer dereference.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 845724c8
......@@ -211,7 +211,7 @@ static int smush_read_packet(AVFormatContext *ctx, AVPacket *pkt)
case MKBETAG('W', 'a', 'v', 'e'):
if (size < 13)
return AVERROR_INVALIDDATA;
if (av_get_packet(pb, pkt, size) < 0)
if (av_get_packet(pb, pkt, size) < 13)
return AVERROR(EIO);
pkt->stream_index = smush->audio_stream_index;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment