[FFmpeg-cvslog] avfilter/vf_shufflepixels: Check ff_get_video_buffer()
Andreas Rheinhardt
git at videolan.org
Fri Jul 23 16:15:10 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Jul 22 09:24:20 2021 +0200| [c4042fc1e3c3b43630c601d3b8c9ea8fc7381f1f] | committer: Andreas Rheinhardt
avfilter/vf_shufflepixels: Check ff_get_video_buffer()
There would be a segfault in case of (likely memory allocation) failure.
Fixes Coverity issue #1322338.
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c4042fc1e3c3b43630c601d3b8c9ea8fc7381f1f
---
libavfilter/vf_shufflepixels.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavfilter/vf_shufflepixels.c b/libavfilter/vf_shufflepixels.c
index b404eefe66..b5e757c929 100644
--- a/libavfilter/vf_shufflepixels.c
+++ b/libavfilter/vf_shufflepixels.c
@@ -377,6 +377,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
ThreadData td;
int ret;
+ if (!out) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
+
ret = av_frame_copy_props(out, in);
if (ret < 0) {
av_frame_free(&out);
More information about the ffmpeg-cvslog
mailing list