Browse Source

smush: check audio packet size

Fixes null pointer dereference.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n1.1
Paul B Mahol 13 years ago
parent
commit
d98364edce
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/smush.c

+ 1
- 1
libavformat/smush.c 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;


Loading…
Cancel
Save