Commit 49336482 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_signature: use av_strlcpy()

Fixes: out of array access
Found-by: 's avatarKira <kira_cxy@foxmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 35eeff30)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 15d4dc0d
......@@ -573,7 +573,8 @@ static int export(AVFilterContext *ctx, StreamContext *sc, int input)
/* error already handled */
av_assert0(av_get_frame_filename(filename, sizeof(filename), sic->filename, input) == 0);
} else {
strcpy(filename, sic->filename);
if (av_strlcpy(filename, sic->filename, sizeof(filename)) >= sizeof(filename))
return AVERROR(EINVAL);
}
if (sic->format == FORMAT_XML) {
return xml_export(ctx, sc, filename);
......
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