ffmpeg | branch: release/7.0 | Michael Niedermayer <[email protected]> | Tue Feb 4 03:58:45 2025 +0100| [5e835cb7bec2b6bbf7735b6500012f1cf1b11cee] | committer: Michael Niedermayer
avcodec/osq: avoid undefined negation Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself Fixes: 390646659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5040277374435328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit c6a889f3e09249d2a643a6beb7d44a8e42ea3541) Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e835cb7bec2b6bbf7735b6500012f1cf1b11cee --- libavcodec/osq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/osq.c b/libavcodec/osq.c index 17dec52fcc..99a035c5c5 100644 --- a/libavcodec/osq.c +++ b/libavcodec/osq.c @@ -189,7 +189,7 @@ static uint32_t get_urice(GetBitContext *gb, int k) static int32_t get_srice(GetBitContext *gb, int x) { - int32_t y = get_urice(gb, x); + uint32_t y = get_urice(gb, x); return get_bits1(gb) ? -y : y; } _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
