projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
666d7d1
)
Ensure that width and height are > 0. avcodec_open() itself only checks that
author
Sebastian Vater
<cdgs.basty@googlemail.com>
Mon, 10 May 2010 17:00:56 +0000
(17:00 +0000)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Mon, 10 May 2010 17:00:56 +0000
(17:00 +0000)
they are >= 0.
Patch by Sebastian Vater <cdgs basty googlemail com>.
Originally committed as revision 23080 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/iff.c
patch
|
blob
|
history
diff --git
a/libavcodec/iff.c
b/libavcodec/iff.c
index
c911811
..
901c8f4
100644
(file)
--- a/
libavcodec/iff.c
+++ b/
libavcodec/iff.c
@@
-115,6
+115,8
@@
static av_cold int decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
+ if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height)))
+ return err;
s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary
s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE);
if (!s->planebuf)