mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 11:47:04 +00:00
avcodec/rasc: Check frame before clearing
Fixes: null pointer dereference
Fixes: 27737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5769028685266944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 380a3a0adf
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7ce729649f
commit
6b0eacc1c2
@ -70,6 +70,9 @@ static void clear_plane(AVCodecContext *avctx, AVFrame *frame)
|
||||
RASCContext *s = avctx->priv_data;
|
||||
uint8_t *dst = frame->data[0];
|
||||
|
||||
if (!dst)
|
||||
return;
|
||||
|
||||
for (int y = 0; y < avctx->height; y++) {
|
||||
memset(dst, 0, avctx->width * s->bpp);
|
||||
dst += frame->linesize[0];
|
||||
|
Loading…
Reference in New Issue
Block a user