1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2024-06-03 19:51:49 +02:00
parent 034054b370
commit 9c9f095e30
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -288,7 +288,9 @@ static int config_props(AVFilterLink *outlink)
double res;
char *expr;
ff_draw_init2(&rot->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ret = ff_draw_init2(&rot->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
if (ret < 0)
return ret;
ff_draw_color(&rot->draw, &rot->color, rot->fillcolor);
rot->hsub = pixdesc->log2_chroma_w;