History

avcodec/smacker: Check input before allocation

Fixes: Timeout Fixes: 421650030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKAUD_fuzzer-6144441767493632

Michael Niedermayer committed 1 year ago

Commit af3852e1 parent 9899c8c1 file · +4 −0Browse files

Unified · Split

libavcodec/smacker.c+4−0
@@ -662,6 +662,10 @@ static int smka_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 661 unmodified lines
662662 } else
663663 values[i] = h.entries[0].value;
664664 }
665+ if (get_bits_left(&gb) < (stereo+1) * (bits+1) * 8) {
666+ ret = AVERROR_INVALIDDATA;
667+ goto error;
668+ }
665669
666670 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
667671 return ret;

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