smush: check audio packet size

Fixes null pointer dereference.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-11-17 19:58:54 +00:00
parent 845724c82c
commit d98364edce
1 changed files with 1 additions and 1 deletions

View File

@ -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;