diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-29 08:05:52 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-29 18:25:07 +0400 |
commit | bf5cc805190b5811b786a454f01cccf9a7e366b9 (patch) | |
tree | b830c5e5671918b246b111762dc384dc5017158d /libavformat | |
parent | e7c1e38ba632f7315e332dd350b38f782f428884 (diff) |
issdemux: Check packet_size for validity
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/iss.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/iss.c b/libavformat/iss.c index 2bae3c1d7b..bbc8465b35 100644 --- a/libavformat/iss.c +++ b/libavformat/iss.c @@ -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); |