Browse Source

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>
tags/n3.4
Michael Niedermayer 8 years ago
parent
commit
9b65dbf734
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/gdv.c

+ 1
- 1
libavcodec/gdv.c View File

@@ -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:


Loading…
Cancel
Save