[FFmpeg-cvslog] avutil/downmix_info: check for side data allocation success before zeroing it
James Almer
git at videolan.org
Tue Jan 28 20:26:37 EET 2025
ffmpeg | branch: master | James Almer <jamrial at 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 <epirat07 at gmail.com>
Signed-off-by: James Almer <jamrial at 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)
More information about the ffmpeg-cvslog
mailing list