diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-22 09:24:20 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-23 15:06:21 +0200 |
commit | c4042fc1e3c3b43630c601d3b8c9ea8fc7381f1f (patch) | |
tree | eb0dd82950001b5731edc30b833b93f8b48f6801 | |
parent | 046cbd255eb748e592d1ad3d5f45d9a306692a10 (diff) | |
download | ffmpeg-c4042fc1e3c3b43630c601d3b8c9ea8fc7381f1f.tar.gz |
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>
-rw-r--r-- | libavfilter/vf_shufflepixels.c | 5 |
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); |