[FFmpeg-cvslog] avcodec/utvideoenc: Use unsigned shift to build flags
Michael Niedermayer
git at videolan.org
Sun Jan 5 01:28:43 EET 2025
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jun 19 23:55:01 2024 +0200| [d91f7ce227f1e5bc4b541776c64989607dd86d4e] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 69e90491f15d8eef643f8dfd1b75805829496678)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d91f7ce227f1e5bc4b541776c64989607dd86d4e
---
libavcodec/utvideoenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index b8e1cc33e5..9a3f714c19 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -218,7 +218,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;
More information about the ffmpeg-cvslog
mailing list