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

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/pdvdec.c+1−1
@@ -93,7 +93,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 92 unmodified lines
9393 return AVERROR_INVALIDDATA;
9494 }
9595
96− if (!(avpkt->flags & AV_PKT_FLAG_KEY)) {
96+ if (prev && !(avpkt->flags & AV_PKT_FLAG_KEY)) {
9797 for (int j = 0; j < (avctx->width + 7) >> 3; j++)
9898 dst[j] ^= prev[j];
9999 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