aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2024-07-14 18:17:44 +0200
committerNiklas Haas <git@haasn.dev>2024-08-16 11:48:02 +0200
commit9824d1539e28607cd79fe83d454f2a4d9078abdc (patch)
treef8a7f953127bfdfb5812d6bc6a3efff9f1ebb540
parent45f5f4d3dab97e71a0f73627f4ae81b768d1d15b (diff)
downloadffmpeg-9824d1539e28607cd79fe83d454f2a4d9078abdc.tar.gz
avcodec/dovi_rpudec: sanitize DM data before decoding
Some DM types do not fill the whole struct, so just clear it entirely before going filling the decoded values.
-rw-r--r--libavcodec/dovi_rpudec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/dovi_rpudec.c b/libavcodec/dovi_rpudec.c
index 91c9e41926..9f295d4fe4 100644
--- a/libavcodec/dovi_rpudec.c
+++ b/libavcodec/dovi_rpudec.c
@@ -323,6 +323,7 @@ static int parse_ext_blocks(DOVIContext *s, GetBitContext *gb, int ver,
dm = &ext->dm_dynamic[ext->num_dynamic++];
}
+ memset(dm, 0, sizeof(*dm));
dm->level = level;
switch (ver) {
case 1: ret = parse_ext_v1(s, gb, dm); break;