Browse Source

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: e1c0cfaa41
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4.8
Michael Niedermayer 11 years ago
parent
commit
16c838b69a
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      libavcodec/tiff.c

+ 8
- 0
libavcodec/tiff.c View File

@@ -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) {


Loading…
Cancel
Save