提交 f61ee9b5 编写于 作者: M Michael Niedermayer

dsicinav: fix signed integer overflow

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 a9a1bc56
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册