Commit 03abf55f authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 50f9de59
......@@ -414,7 +414,11 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb,
skip:
/* skip codec info */
size = avio_tell(pb) - codec_pos;
avio_skip(pb, codec_data_size - size);
if (codec_data_size >= size) {
avio_skip(pb, codec_data_size - size);
} else {
av_log(s, AV_LOG_WARNING, "codec_data_size %u < size %d\n", codec_data_size, size);
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment