History

avcodec/dpcm: fix undefined interger overflow in wady

Fixes: signed integer overflow: -2147375930 + -133875 cannot be represented in type 'int' Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WADY_DPCM_fuzzer-6703727013920768

Michael Niedermayer committed 3 years ago

Commit 8f0e2001 parent 6e98cf01 file · +1 −1Browse files

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

Unified · Split

libavcodec/dpcm.c+1−1
@@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 443 unmodified lines
444444 if (n & 0x80)
445445 s->sample[idx] = sign_extend((n & 0x7f) << 9, 16);
446446 else
447− s->sample[idx] += s->scale * wady_table[n & 0x7f];
447+ s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f];
448448 *output_samples++ = av_clip_int16(s->sample[idx]);
449449 idx ^= stereo;
450450 }

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