History

avcodec/wavarc: Fix k limit

The implementation does not support k=32 Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int' Fixes: 57976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5911925807775744

Michael Niedermayer committed 3 years ago

Commit 40cec0b1 parent 071c6251 file · +2 −2Browse files

Unified · Split

libavcodec/wavarc.c+2−2
@@ -205,7 +205,7 @@ static int decode_1dif(AVCodecContext *avctx, · 204 unmodified lines
205205 if (block_type < 4 && block_type >= 0) {
206206 k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
207207 k = get_urice(gb, k) + 1;
208− if (k > 32)
208+ if (k >= 32)
209209 return AVERROR_INVALIDDATA;
210210 }
211211
@@ -297,7 +297,7 @@ static int decode_2slp(AVCodecContext *avctx, · 85 unmodified lines
297297 if (block_type < 5 && block_type >= 0) {
298298 k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
299299 k = get_urice(gb, k) + 1;
300− if (k > 32)
300+ if (k >= 32)
301301 return AVERROR_INVALIDDATA;
302302 }
303303

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