[FFmpeg-cvslog] matroskadec: check h in generic rm packet shuffler
Michael Niedermayer
git at videolan.org
Sun Nov 11 02:29:09 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 11 01:00:04 2012 +0100| [c2ca0163affa524f4074c6328bf85c944b65dba2] | committer: Michael Niedermayer
matroskadec: check h in generic rm packet shuffler
Fixes crash
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2ca0163affa524f4074c6328bf85c944b65dba2
---
libavformat/matroskadec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ec279ed..61ba6ec 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;
More information about the ffmpeg-cvslog
mailing list