You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/vvc/dec: fix possible null-pointer dereference
When checking for filmgrain here, needs_fg can be true even when film_grain_characteristics is NULL (when aom_film_grain.enable is true), therefore this check could end up dereferencing film_grain_characteristics even though it is NULL. Fix CID 1648347
This commit is contained in:
@ -770,7 +770,8 @@ static int check_film_grain(VVCContext *s, VVCFrameContext *fc)
|
|||||||
!s->avctx->hwaccel;
|
!s->avctx->hwaccel;
|
||||||
|
|
||||||
if (fc->ref->needs_fg &&
|
if (fc->ref->needs_fg &&
|
||||||
(fc->sei.common.film_grain_characteristics->present &&
|
(fc->sei.common.film_grain_characteristics &&
|
||||||
|
fc->sei.common.film_grain_characteristics->present &&
|
||||||
!ff_h274_film_grain_params_supported(fc->sei.common.film_grain_characteristics->model_id,
|
!ff_h274_film_grain_params_supported(fc->sei.common.film_grain_characteristics->model_id,
|
||||||
fc->ref->frame->format) ||
|
fc->ref->frame->format) ||
|
||||||
!av_film_grain_params_select(fc->ref->frame))) {
|
!av_film_grain_params_select(fc->ref->frame))) {
|
||||||
|
Reference in New Issue
Block a user