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:
caa2fa2
)
ituh263dec: more complete w/h check.
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 15 Nov 2012 01:43:38 +0000
(
02:43
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 15 Nov 2012 01:44:03 +0000
(
02:44
+0100)
Fixes a division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ituh263dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/ituh263dec.c
b/libavcodec/ituh263dec.c
index
86c5c06
..
6c95636
100644
(file)
--- a/
libavcodec/ituh263dec.c
+++ b/
libavcodec/ituh263dec.c
@@
-1075,6
+1075,10
@@
int ff_h263_decode_picture_header(MpegEncContext *s)
s->qscale = get_bits(&s->gb, 5);
}
+ if (s->width == 0 || s->height == 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "dimensions 0\n");
+ return -1;
+ }
s->mb_width = (s->width + 15) / 16;
s->mb_height = (s->height + 15) / 16;
s->mb_num = s->mb_width * s->mb_height;