Compare commits

...

5 Commits

Author SHA1 Message Date
James Almer 31327c2d07 avformat/mov: fix the check for the heif item parsing loop
Fixes: Null pointer dereference
Fixes: 67861/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5352628142800896

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-27 19:39:23 -03:00
Timo Rothenpieler 59767636c7 fate: allow https for git URLs 2024-04-27 23:24:58 +02:00
Michael Niedermayer 091fdce87e
avcodec/pngdec: Check last AVFrame before deref
Fixes: NULL pointer dereference
Fixes: 68184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-4926478069334016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-27 21:16:40 +02:00
Michael Niedermayer d9699464c3
avcodec/vp3: Call ff_progress_frame_unref() before ff_progress_frame_get_buffer()
Fixes: Assertion !f->f && !f->progress failed at libavcodec/decode.c:1688
Fixes: 68190/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-5942090287611904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-27 21:16:40 +02:00
Michael Niedermayer 5eb05f4450
avcodec/hevcdec: Check ref frame
Fixes: NULL pointer dereferences
Fixes: 68197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6382538823106560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-04-27 21:16:39 +02:00
5 changed files with 8 additions and 6 deletions

View File

@ -1969,13 +1969,13 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0,
if (current_mv.pred_flag & PF_L0) {
ref0 = refPicList[0].ref[current_mv.ref_idx[0]];
if (!ref0 || !ref0->frame->data[0])
if (!ref0 || !ref0->frame)
return;
hevc_await_progress(s, ref0, &current_mv.mv[0], y0, nPbH);
}
if (current_mv.pred_flag & PF_L1) {
ref1 = refPicList[1].ref[current_mv.ref_idx[1]];
if (!ref1 || !ref1->frame->data[0])
if (!ref1 || !ref1->frame)
return;
hevc_await_progress(s, ref1, &current_mv.mv[1], y0, nPbH);
}

View File

@ -1218,7 +1218,7 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s,
return AVERROR_INVALIDDATA;
}
if ((sequence_number == 0 || !s->last_picture.f->data[0]) &&
if ((sequence_number == 0 || !s->last_picture.f) &&
dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
// No previous frame to revert to for the first frame
// Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND

View File

@ -2651,6 +2651,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (avctx->skip_frame >= AVDISCARD_NONKEY && !s->keyframe)
return buf_size;
ff_progress_frame_unref(&s->current_frame);
ret = ff_progress_frame_get_buffer(avctx, &s->current_frame,
AV_GET_BUFFER_FLAG_REF);
if (ret < 0) {

View File

@ -9440,7 +9440,8 @@ static int mov_parse_tiles(AVFormatContext *s)
break;
}
if (k == grid->nb_tiles) {
if (k == mov->nb_heif_item) {
av_assert0(loop);
av_log(s, AV_LOG_WARNING, "HEIF item id %d referenced by grid id %d doesn't "
"exist\n",
tile_id, grid->item->item_id);

View File

@ -30,14 +30,14 @@ lock(){
checkout(){
case "$repo" in
file:*|/*) src="${repo#file:}" ;;
git:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
esac
}
update()(
cd ${src} || return
case "$repo" in
git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
esac
)