avfilter/vf_rotate: Check ff_draw_init2() return value
Fixes: NULL pointer dereference
Fixes: 3_343
Found-by: De3mond
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9c9f095e30)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -296,7 +296,9 @@ static int config_props(AVFilterLink *outlink)
|
|||||||
double res;
|
double res;
|
||||||
char *expr;
|
char *expr;
|
||||||
|
|
||||||
ff_draw_init(&rot->draw, inlink->format, 0);
|
ret = ff_draw_init(&rot->draw, inlink->format, 0);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
ff_draw_color(&rot->draw, &rot->color, rot->fillcolor);
|
ff_draw_color(&rot->draw, &rot->color, rot->fillcolor);
|
||||||
|
|
||||||
rot->hsub = pixdesc->log2_chroma_w;
|
rot->hsub = pixdesc->log2_chroma_w;
|
||||||
|
|||||||
Reference in New Issue
Block a user