History

avcodec/adpcm: Fix overflow in FFABS() IMA_EA_EACS

Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 19235/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_EA_EACS_fuzzer-5680878952382464

Michael Niedermayer committed 6 years ago

Commit 794352a1 parent 6a865ce1 file · +1 −1Browse files

Unified · Split

libavcodec/adpcm.c+1−1
@@ -1233,7 +1233,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 1232 unmodified lines
1233 }1233 }
1234 for (i=0; i<=st; i++) {1234 for (i=0; i<=st; i++) {
1235 c->status[i].predictor = bytestream2_get_le32u(&gb);1235 c->status[i].predictor = bytestream2_get_le32u(&gb);
1236 if (FFABS(c->status[i].predictor) > (1<<16))1236 if (FFABS((int64_t)c->status[i].predictor) > (1<<16))
1237 return AVERROR_INVALIDDATA;1237 return AVERROR_INVALIDDATA;
1238 }1238 }
1239 1239

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