Message ID | 20230502153820.32234-3-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 5cc378cc466121fc9de1657ea76deeba9f92089a |
Headers | show |
Series | [FFmpeg-devel,1/3] avcodec/rka: avoid undefined multiply in cmode==0 | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/pdvdec.c b/libavcodec/pdvdec.c index b1fc19b1c9..605af78050 100644 --- a/libavcodec/pdvdec.c +++ b/libavcodec/pdvdec.c @@ -93,7 +93,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } - if (!(avpkt->flags & AV_PKT_FLAG_KEY)) { + if (prev && !(avpkt->flags & AV_PKT_FLAG_KEY)) { for (int j = 0; j < (avctx->width + 7) >> 3; j++) dst[j] ^= prev[j]; prev += prev_frame->linesize[0];
Fixes: load of null pointer of type 'uint8_t' (aka 'unsigned char') Fixes: 58256/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PDV_fuzzer-4776436325285888 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/pdvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)