avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
50f9de59a0
commit
03abf55f25
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user