ffmpeg | branch: master | Niklas Haas <g...@haasn.dev> | Sun Jul 14 18:17:44 
2024 +0200| [9824d1539e28607cd79fe83d454f2a4d9078abdc] | committer: Niklas Haas

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9824d1539e28607cd79fe83d454f2a4d9078abdc
---

 libavcodec/dovi_rpudec.c | 1 +
 1 file changed, 1 insertion(+)

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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to