ffmpeg | branch: release/7.0 | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Thu May 2 23:23:17 2024 +0200| [a08da68e0a38a2eefb0b858227573aeceb756631] | committer: Andreas Rheinhardt
avformat/movenc: Check av_malloc() Fixes Coverity issue #1596735. Reviewed-by: Michael Niedermayer <mich...@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> (cherry picked from commit 601873263e618e2dc2b615ae95e605575171ee30) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a08da68e0a38a2eefb0b858227573aeceb756631 --- libavformat/movenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index e40948edb8..e6a815107b 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1222,6 +1222,8 @@ static int mov_write_chnl_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra if (ret || !config) { config = 0; speaker_pos = av_malloc(layout->nb_channels); + if (!speaker_pos) + return AVERROR(ENOMEM); ret = ff_mov_get_channel_positions_from_layout(layout, speaker_pos, layout->nb_channels); if (ret) { _______________________________________________ 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".