aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 22:51:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 22:51:08 +0100
commit90afa95a55a26bd407604e279f3bb551201ed6d7 (patch)
treeed8ddb70bb9c3bfd5363758bd4c2a4e25646b96e
parent817ed4fae9d0221af12f60309db8b8263e60c9c8 (diff)
parentec5b2f6a385959048f780b4e7d3d259dc1fa8421 (diff)
downloadffmpeg-90afa95a55a26bd407604e279f3bb551201ed6d7.tar.gz
Merge commit 'ec5b2f6a385959048f780b4e7d3d259dc1fa8421' into release/0.10
* commit 'ec5b2f6a385959048f780b4e7d3d259dc1fa8421': tiff: Check that there is no aliasing in pixel format selection Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/tiff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index a6df3b48bd..00ff8d3e39 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -266,6 +266,14 @@ static int init_image(TiffContext *s)
int i, ret;
uint32_t *pal;
+ // make sure there is no aliasing in the following switch
+ if (s->bpp >= 100 || s->bppcount >= 10) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "Unsupported image parameters: bpp=%d, bppcount=%d\n",
+ s->bpp, s->bppcount);
+ return AVERROR_INVALIDDATA;
+ }
+
switch (s->bpp * 10 + s->bppcount) {
case 11:
if (!s->palette_is_set) {