[FFmpeg-cvslog] dsicinav: fix signed integer overflow
Michael Niedermayer
git at videolan.org
Fri Aug 31 15:25:00 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 31 15:15:59 2012 +0200| [f61ee9b5649192e2b644df59c6def6eac1d0bf48] | committer: Michael Niedermayer
dsicinav: fix signed integer overflow
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f61ee9b5649192e2b644df59c6def6eac1d0bf48
---
libavcodec/dsicinav.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index bd585c3..1679bfe 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list