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/pngdec.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/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 4a6047e11a..a75420b144 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -592,10 +592,10 @@ static int decode_frame(AVCodecContext *avctx, r = bytestream2_get_byte(&s->gb); g = bytestream2_get_byte(&s->gb); b = bytestream2_get_byte(&s->gb); - s->palette[i] = (0xff << 24) | (r << 16) | (g << 8) | b; + s->palette[i] = (0xFFU << 24) | (r << 16) | (g << 8) | b; } for(;i<256;i++) { - s->palette[i] = (0xff << 24); + s->palette[i] = (0xFFU << 24); } s->state |= PNG_PLTE; bytestream2_skip(&s->gb, 4); /* crc */ |