History

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

Michael Niedermayer committed 1 year ago

Commit c6a889f1 parent d16a0581 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/osq.c+1−1
@@ -190,7 +190,7 @@ static uint32_t get_urice(GetBitContext *gb, int k) · 189 unmodified lines
190 190
191static int32_t get_srice(GetBitContext *gb, int x)191static int32_t get_srice(GetBitContext *gb, int x)
192{192{
193 int32_t y = get_urice(gb, x);193 uint32_t y = get_urice(gb, x);
194 return get_bits1(gb) ? -y : y;194 return get_bits1(gb) ? -y : y;
195}195}
196 196

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t