mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_signature: use av_strlcpy()
Fixes: out of array access
Found-by: Kira <kira_cxy@foxmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 35eeff30ca
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
51035698bd
commit
43916494f8
@ -576,7 +576,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);
|
||||
|
Loading…
Reference in New Issue
Block a user