aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-09 00:43:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-09 00:43:26 +0100
commit16c838b69a4e359705cfd3f1b4c6e2113c934c85 (patch)
tree85793619ae7a3f77fedeb60d37a74bb5ded835fc /libavcodec
parente2c82f7d9362192671bff9959303892107c5d114 (diff)
parent77eb3d9a60a9c2bb6d87c960ac186af242bbcc9e (diff)
downloadffmpeg-16c838b69a4e359705cfd3f1b4c6e2113c934c85.tar.gz
Merge commit '77eb3d9a60a9c2bb6d87c960ac186af242bbcc9e' into release/2.4
* commit '77eb3d9a60a9c2bb6d87c960ac186af242bbcc9e': tiff: Check that there is no aliasing in pixel format selection Conflicts: libavcodec/tiff.c See: e1c0cfaa419aa5d320540d5a1b3f8fd9b82ab7e5 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/tiff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 4cb6668efb..eb2a9630da 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -655,6 +655,14 @@ static int init_image(TiffContext *s, ThreadFrame *frame)
int ret;
int create_gray_palette = 0;
+ // 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->planar * 1000 + s->bpp * 10 + s->bppcount) {
case 11:
if (!s->palette_is_set) {