diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 03:17:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 03:26:31 +0200 |
commit | b12d92efd6c0d48665383a9baecc13e7ebbd8a22 (patch) | |
tree | 2e1493948ffac773901d9d737fd0cd8b468d02f8 /libavcodec/tiff.c | |
parent | d3d715ff134555570d7e2c2aa15aad50f6c6fdbd (diff) | |
download | ffmpeg-b12d92efd6c0d48665383a9baecc13e7ebbd8a22.tar.gz |
avoid "0xFF << 24" as it is considered a integer overflow in C99
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r-- | libavcodec/tiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index ed4670f23e..ad0b0bae5a 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -607,7 +607,7 @@ static int init_image(TiffContext *s) /* make default grayscale pal */ pal = (uint32_t *) s->picture.data[1]; for (i = 0; i < 1<<s->bpp; i++) - pal[i] = 0xFF << 24 | i * 255 / ((1<<s->bpp) - 1) * 0x010101; + pal[i] = 0xFFU << 24 | i * 255 / ((1<<s->bpp) - 1) * 0x010101; } } return 0; @@ -824,7 +824,7 @@ static int tiff_decode_tag(TiffContext *s) for (k = 2; k >= 0; k--) { for (i = 0; i < count / 3; i++) { if (k == 2) - pal[i] = 0xff << 24; + pal[i] = 0xFFU << 24; j = (tget(&s->gb, type, s->le) >> off) << (k * 8); pal[i] |= j; } |