mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-04 14:40:26 +00:00
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 <michael@niedermayer.cc>
This commit is contained in:
parent
af739541bf
commit
f435ce22e1
1 changed files with 4 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue