aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-11 01:00:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-11 01:19:44 +0100
commitc2ca0163affa524f4074c6328bf85c944b65dba2 (patch)
treea90eeef673dce4b2dd6461e8771fb1c5d60c52ab /libavformat
parent1f41cffe1e3e79620f587545bdfcbd7e6e68ed29 (diff)
downloadffmpeg-c2ca0163affa524f4074c6328bf85c944b65dba2.tar.gz
matroskadec: check h in generic rm packet shuffler
Fixes crash Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ec279ed3c9..61ba6ec2d6 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2032,7 +2032,7 @@ static int matroska_parse_rm_audio(MatroskaDemuxContext *matroska,
}
memcpy(track->audio.buf + y*w, data, w);
} else {
- if (size < sps * w / sps) {
+ if (size < sps * w / sps || h<=0) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Corrupt generic RM-style audio packet size\n");
return AVERROR_INVALIDDATA;