1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

issdemux: Check packet_size for validity

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-29 05:05:52 +01:00
parent e7c1e38ba6
commit bf5cc80519

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);