Browse Source

issdemux: Check packet_size for validity

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 14 years ago
parent
commit
bf5cc80519
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/iss.c

+ 5
- 0
libavformat/iss.c View File

@@ -87,6 +87,11 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_token(pb, token, sizeof(token)); //Version ID
get_token(pb, token, sizeof(token)); //Size

if (iss->packet_size <= 0) {
av_log(s, AV_LOG_ERROR, "packet_size %d is invalid\n", iss->packet_size);
return AVERROR_INVALIDDATA;
}

iss->sample_start_pos = avio_tell(pb);

st = avformat_new_stream(s, NULL);


Loading…
Cancel
Save