aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/gdv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-16 23:31:42 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 23:32:28 +0200
commit9b65dbf7349aace16f7ca65f7cef1a368e2d83d9 (patch)
tree392546de3dc895765d95b7d92d3dcb7f7578212c /libavcodec/gdv.c
parentdfb61ea2630029b7aec7911aade769bf1a914eea (diff)
downloadffmpeg-9b65dbf7349aace16f7ca65f7cef1a368e2d83d9.tar.gz
avcodec/gdv: Fix undefined shift
Fixes: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 2249/clusterfuzz-testcase-minimized-5388542379294720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/gdv.c')
-rw-r--r--libavcodec/gdv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index cae82b825d..275af9a351 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -330,7 +330,7 @@ static int gdv_decode_frame(AVCodecContext *avctx, void *data,
unsigned r = bytestream2_get_byte(gb);
unsigned g = bytestream2_get_byte(gb);
unsigned b = bytestream2_get_byte(gb);
- gdv->pal[i] = 0xFF << 24 | r << 18 | g << 10 | b << 2;
+ gdv->pal[i] = 0xFFU << 24 | r << 18 | g << 10 | b << 2;
}
break;
case 3: