mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
rmdec: Validate the fps value
Abort if it is invalid if strict error checking has been requested. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
e7bf085b78
commit
0f310a6f33
@ -332,8 +332,13 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
|
|||||||
if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0)
|
if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (avio_tell(pb) - codec_pos))) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
av_reduce(&st->avg_frame_rate.den, &st->avg_frame_rate.num,
|
if (fps > 0) {
|
||||||
0x10000, fps, (1 << 30) - 1);
|
av_reduce(&st->avg_frame_rate.den, &st->avg_frame_rate.num,
|
||||||
|
0x10000, fps, (1 << 30) - 1);
|
||||||
|
} else if (s->error_recognition & AV_EF_EXPLODE) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "Invalid framerate\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user