History

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

Marvin Scholz committed 1 year ago

Commit 3d7668d1 parent 26807591 file · +2 −1Browse files

Unified · Split

libavcodec/vvc/dec.c+2−1
@@ -770,7 +770,8 @@ static int check_film_grain(VVCContext *s, VVCFrameContext *fc) · 769 unmodified lines
770770 !s->avctx->hwaccel;
771771
772772 if (fc->ref->needs_fg &&
773− (fc->sei.common.film_grain_characteristics->present &&
773+ (fc->sei.common.film_grain_characteristics &&
774+ fc->sei.common.film_grain_characteristics->present &&
774775 !ff_h274_film_grain_params_supported(fc->sei.common.film_grain_characteristics->model_id,
775776 fc->ref->frame->format) ||
776777 !av_film_grain_params_select(fc->ref->frame))) {

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