Commit 93d9ce7c authored by Clément Bœsch's avatar Clément Bœsch

avfilter/formats: use av_realloc_array in ADD_FORMAT()

parent 38fb183b
......@@ -308,8 +308,8 @@ do { \
if (!(*f) && !(*f = av_mallocz(sizeof(**f)))) \
return AVERROR(ENOMEM); \
\
fmts = av_realloc((*f)->list, \
sizeof(*(*f)->list) * ((*f)->nb + 1));\
fmts = av_realloc_array((*f)->list, (*f)->nb + 1, \
sizeof(*(*f)->list)); \
if (!fmts) { \
if (!oldf) \
av_freep(f); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment