aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-19 23:55:01 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-16 19:03:50 +0200
commit69e90491f15d8eef643f8dfd1b75805829496678 (patch)
tree4ed30235551870c641a55db5a9fe28f480d872f6
parenta84fbd747119841942c67d2f55cc796ab25cd245 (diff)
downloadffmpeg-69e90491f15d8eef643f8dfd1b75805829496678.tar.gz
avcodec/utvideoenc: Use unsigned shift to build flags
Fixes: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 69083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-5608202363273216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/utvideoenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index 59e198458b..b35b34d5a1 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -239,7 +239,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
* - Compression mode (none/huff)
* And write the flags.
*/
- c->flags = (c->slices - 1) << 24;
+ c->flags = (c->slices - 1U) << 24;
c->flags |= 0 << 11; // bit field to signal interlaced encoding mode
c->flags |= c->compression;