git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
192db16
)
msmpeg4dec: check w/h, prevent assert failure later
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 11 Nov 2012 17:45:56 +0000
(18:45 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 11 Nov 2012 17:46:22 +0000
(18:46 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/msmpeg4.c
patch
|
blob
|
history
diff --git
a/libavcodec/msmpeg4.c
b/libavcodec/msmpeg4.c
index
7988e1f
..
39305f7
100644
(file)
--- a/
libavcodec/msmpeg4.c
+++ b/
libavcodec/msmpeg4.c
@@
-593,6
+593,11
@@
av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
int i;
MVTable *mv;
+ if(avctx->width<=0 || avctx->height<=0) {
+ av_log(avctx, AV_LOG_ERROR, "invalid dimensions\n");
+ return -1;
+ }
+
if (ff_h263_decode_init(avctx) < 0)
return -1;