summaryrefslogtreecommitdiff
path: root/libavfilter/vf_shufflepixels.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-22 09:24:20 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-23 15:06:21 +0200
commitc4042fc1e3c3b43630c601d3b8c9ea8fc7381f1f (patch)
treeeb0dd82950001b5731edc30b833b93f8b48f6801 /libavfilter/vf_shufflepixels.c
parent046cbd255eb748e592d1ad3d5f45d9a306692a10 (diff)
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@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_shufflepixels.c')
-rw-r--r--libavfilter/vf_shufflepixels.c5
1 files changed, 5 insertions, 0 deletions
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);