ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Tue Jan 28 14:49:07 
2025 -0300| [a649b2a8313571fcec101143e9479299eb8bc214] | committer: James Almer

avutil/downmix_info: check for side data allocation success before zeroing it

Fixes coverity #1641638.

Marvin Scholz <epira...@gmail.com>
Signed-off-by: James Almer <jamr...@gmail.com>

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

 libavutil/downmix_info.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/downmix_info.c b/libavutil/downmix_info.c
index feaee28493..7e6c3e854d 100644
--- a/libavutil/downmix_info.c
+++ b/libavutil/downmix_info.c
@@ -30,7 +30,8 @@ AVDownmixInfo *av_downmix_info_update_side_data(AVFrame 
*frame)
     if (!side_data) {
         side_data = av_frame_new_side_data(frame, AV_FRAME_DATA_DOWNMIX_INFO,
                                            sizeof(AVDownmixInfo));
-        memset(side_data->data, 0, sizeof(AVDownmixInfo));
+        if (side_data)
+            memset(side_data->data, 0, sizeof(AVDownmixInfo));
     }
 
     if (!side_data)

_______________________________________________
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