[FFmpeg-cvslog] smush: check audio packet size

Paul B Mahol git at videolan.org
Sat Nov 17 21:04:22 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Nov 17 19:58:54 2012 +0000| [d98364edcedb71662cb1761bd30d67053d60a3c6] | committer: Paul B Mahol

smush: check audio packet size

Fixes null pointer dereference.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d98364edcedb71662cb1761bd30d67053d60a3c6
---

 libavformat/smush.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/smush.c b/libavformat/smush.c
index 19ac5d9..9c8997c 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;



More information about the ffmpeg-cvslog mailing list