Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-17 18:56:33 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-09-17 20:26:53 +0400
commit4907f813581acd6cf68f1be9eb163464503e8208 (patch)
tree88034c16a8f782c3fd638c30b1869c698c20fc57 /libavformat/rmdec.c
parent352c878de6fca57a3f2a6369e27ca442fa5f9518 (diff)
Reject audio tracks with invalid interleaver parameters in RM demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 5e34647ceb..4d1e75aa40 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -215,8 +215,9 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
ast->audio_framesize = st->codec->block_align;
st->codec->block_align = coded_framesize;
- if(ast->audio_framesize >= UINT_MAX / sub_packet_h){
- av_log(s, AV_LOG_ERROR, "ast->audio_framesize * sub_packet_h too large\n");
+ if (ast->audio_framesize <= 0 || sub_packet_h <= 0 ||
+ ast->audio_framesize >= UINT_MAX / sub_packet_h){
+ av_log(s, AV_LOG_ERROR, "ast->audio_framesize * sub_packet_h is invalid\n");
return -1;
}
@@ -252,8 +253,9 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
if ((ret = rm_read_extradata(pb, st->codec, codecdata_length)) < 0)
return ret;
- if(ast->audio_framesize >= UINT_MAX / sub_packet_h){
- av_log(s, AV_LOG_ERROR, "rm->audio_framesize * sub_packet_h too large\n");
+ if (ast->audio_framesize <= 0 || sub_packet_h <= 0 ||
+ ast->audio_framesize >= UINT_MAX / sub_packet_h){
+ av_log(s, AV_LOG_ERROR, "rm->audio_framesize * sub_packet_h is invalid\n");
return -1;
}