From d98364edcedb71662cb1761bd30d67053d60a3c6 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 17 Nov 2012 19:58:54 +0000 Subject: [PATCH] smush: check audio packet size Fixes null pointer dereference. Signed-off-by: Paul B Mahol --- libavformat/smush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/smush.c b/libavformat/smush.c index 19ac5d9491..9c8997cc00 100644 --- a/libavformat/smush.c +++ b/libavformat/smush.c @@ -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;