This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new f435ce22e1 avcodec/h2645_sei: Initialize side data before deallocation
f435ce22e1 is described below

commit f435ce22e10e2c93fc8027cc72eeb09eba50ab8d
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun May 17 16:55:54 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun May 17 16:00:37 2026 +0000

    avcodec/h2645_sei: Initialize side data before deallocation
    
    Fixes: use after free
    Fixes: poc_hvcc_modified.mp4
    
    Found by: Jiale Yao
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/h2645_sei.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c
index 638362fbf6..c9fb25b1da 100644
--- a/libavcodec/h2645_sei.c
+++ b/libavcodec/h2645_sei.c
@@ -629,15 +629,15 @@ static int h2645_sei_to_side_data(AVCodecContext *avctx, 
H2645SEI *sei,
             return AVERROR(ENOMEM);
         }
 
+        dst_env->ambient_illuminance = av_make_q(env->ambient_illuminance, 
10000);
+        dst_env->ambient_light_x     = av_make_q(env->ambient_light_x,     
50000);
+        dst_env->ambient_light_y     = av_make_q(env->ambient_light_y,     
50000);
+
         ret = ff_frame_new_side_data_from_buf_ext(avctx, sd, nb_sd,
                                                   
AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT, &buf);
 
         if (ret < 0)
             return ret;
-
-        dst_env->ambient_illuminance = av_make_q(env->ambient_illuminance, 
10000);
-        dst_env->ambient_light_x     = av_make_q(env->ambient_light_x,     
50000);
-        dst_env->ambient_light_y     = av_make_q(env->ambient_light_y,     
50000);
     }
 
     if (sei->mastering_display.present) {

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to