History

avcodec/pdvdec: Check previous frame before using it

Fixes: load of null pointer of type 'uint8_t' (aka 'unsigned char') Fixes: 58256/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PDV_fuzzer-4776436325285888

Michael Niedermayer committed 3 years ago

Commit 5cc378c1 parent ed369131 file · +1 −1Browse files

Unified · Split

libavcodec/pdvdec.c+1−1
@@ -93,7 +93,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 92 unmodified lines
93 return AVERROR_INVALIDDATA;93 return AVERROR_INVALIDDATA;
94 }94 }
95 95
96 if (!(avpkt->flags & AV_PKT_FLAG_KEY)) {96 if (prev && !(avpkt->flags & AV_PKT_FLAG_KEY)) {
97 for (int j = 0; j < (avctx->width + 7) >> 3; j++)97 for (int j = 0; j < (avctx->width + 7) >> 3; j++)
98 dst[j] ^= prev[j];98 dst[j] ^= prev[j];
99 prev += prev_frame->linesize[0];99 prev += prev_frame->linesize[0];

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