History

avcodec/msp2dec: Check available space in RLE decoder

Fixes: out of array read Fixes: 32968/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSP2_fuzzer-5315296027082752

Michael Niedermayer committed 5 years ago

Commit caaf4631 parent 44c8b671 file · +1 −0Browse files

Unified · Split

libavcodec/msp2dec.c+1−0
@@ -71,6 +71,7 @@ static int msp2_decode_frame(AVCodecContext *avctx, · 70 unmodified lines
7171 while (bytestream2_get_bytes_left(&gb) && x < width) {
7272 int size = bytestream2_get_byte(&gb);
7373 if (size) {
74+ size = FFMIN(size, bytestream2_get_bytes_left(&gb));
7475 memcpy(p->data[0] + y * p->linesize[0] + x, gb.buffer, FFMIN(size, width - x));
7576 bytestream2_skip(&gb, size);
7677 } else {

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