Skip to content
Snippets Groups Projects
Commit 49250b58 authored by Wu Jianhua's avatar Wu Jianhua Committed by Lynne
Browse files

avfilter/vf_blend: fix un-checked potential memory allocation failure


Signed-off-by: default avatarWu Jianhua <jianhua.wu@intel.com>
parent aa8bb05d
No related branches found
No related tags found
No related merge requests found
...@@ -279,7 +279,11 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf, ...@@ -279,7 +279,11 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf,
dst_buf = ff_get_video_buffer(outlink, outlink->w, outlink->h); dst_buf = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!dst_buf) if (!dst_buf)
return top_buf; return top_buf;
av_frame_copy_props(dst_buf, top_buf);
if (av_frame_copy_props(dst_buf, top_buf) < 0) {
av_frame_free(&dst_buf);
return top_buf;
}
for (plane = 0; plane < s->nb_planes; plane++) { for (plane = 0; plane < s->nb_planes; plane++) {
int hsub = plane == 1 || plane == 2 ? s->hsub : 0; int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment