diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 14:13:30 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 14:13:35 +0100 |
commit | d7a8d07fd81cc0a6e1ecc9e5fee4ebcd93d975bc (patch) | |
tree | 4cdac266858beab5ada86ae53f1cbe5d13e9e5e8 | |
parent | a2dc8dcb66ea87b049f1b7bdb1959d609680e286 (diff) | |
parent | 62b0462e5fa78901380ca229ddb6a7625efd61a2 (diff) | |
download | ffmpeg-d7a8d07fd81cc0a6e1ecc9e5fee4ebcd93d975bc.tar.gz |
Merge commit '62b0462e5fa78901380ca229ddb6a7625efd61a2' into release/1.1
* commit '62b0462e5fa78901380ca229ddb6a7625efd61a2':
tiff: Check that there is no aliasing in pixel format selection
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/tiff.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index d85a7d1df6..239750d3d6 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -605,6 +605,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) { |