History

avcodec/vorbisdec: fix FASTDIV usage for vr_type == 2

This reverts a hunk from f1ca40ee00402102046fc7e59606651930436b0e Fixes: out of array read Fixes: 16924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-5157893162139648

Michael Niedermayer committed 7 years ago

Commit 722fd461 parent aef24ef1 file · +1 −1Browse files

Unified · Split

libavcodec/vorbisdec.c+1−1
@@ -1513,7 +1513,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, · 1512 unmodified lines
1513 }1513 }
1514 1514
1515 } else if (vr_type == 2) {1515 } else if (vr_type == 2) {
1516 unsigned voffs_div = FASTDIV(voffset << 1, ch <<1);1516 unsigned voffs_div = ch == 1 ? voffset : FASTDIV(voffset, ch);
1517 unsigned voffs_mod = voffset - voffs_div * ch;1517 unsigned voffs_mod = voffset - voffs_div * ch;
1518 1518
1519 for (k = 0; k < step; ++k) {1519 for (k = 0; k < step; ++k) {

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