Browse Source

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>
tags/n4.0
Michael Niedermayer 8 years ago
parent
commit
35eeff30ca
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavfilter/vf_signature.c

+ 2
- 1
libavfilter/vf_signature.c View File

@@ -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…
Cancel
Save