1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

dsicinav: fix signed integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-08-31 15:15:59 +02:00
parent a9a1bc56ab
commit f61ee9b564

View File

@ -227,12 +227,12 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
if (palette_colors_count > 256)
return AVERROR_INVALIDDATA;
for (i = 0; i < palette_colors_count; ++i) {
cin->palette[i] = 0xFF << 24 | bytestream_get_le24(&buf);
cin->palette[i] = 0xFFU << 24 | bytestream_get_le24(&buf);
bitmap_frame_size -= 3;
}
} else {
for (i = 0; i < palette_colors_count; ++i) {
cin->palette[buf[0]] = 0xFF << 24 | AV_RL24(buf+1);
cin->palette[buf[0]] = 0xFFU << 24 | AV_RL24(buf+1);
buf += 4;
bitmap_frame_size -= 4;
}