Browse Source

avformat/rmdec: Check for overflow in ff_rm_read_mdpr_codecdata()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
03abf55f25
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libavformat/rmdec.c

+ 5
- 1
libavformat/rmdec.c View File

@@ -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…
Cancel
Save