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>
This commit is contained in:
@@ -266,6 +266,14 @@ static int init_image(TiffContext *s)
|
|||||||
int i, ret;
|
int i, ret;
|
||||||
uint32_t *pal;
|
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) {
|
switch (s->bpp * 10 + s->bppcount) {
|
||||||
case 11:
|
case 11:
|
||||||
if (!s->palette_is_set) {
|
if (!s->palette_is_set) {
|
||||||
|
Reference in New Issue
Block a user