[FFmpeg-cvslog] avfilter/vf_signature: use av_strlcpy()
ffmpeg | branch: release/3.3 | Michael Niedermayer| Fri Mar 30 02:16:31 2018 +0200| [49336482fd04541623e9418264644dd80640dbfe] | committer: Michael Niedermayer avfilter/vf_signature: use av_strlcpy() Fixes: out of array access Found-by: Kira Signed-off-by: Michael Niedermayer (cherry picked from commit 35eeff30caf34df835206f1c12bcf4b7c2bd6758) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49336482fd04541623e9418264644dd80640dbfe --- libavfilter/vf_signature.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index 06b1b910d4..3b117e7735 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -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); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_signature: use av_strlcpy()
ffmpeg | branch: master | Michael Niedermayer| Fri Mar 30 02:16:31 2018 +0200| [35eeff30caf34df835206f1c12bcf4b7c2bd6758] | committer: Michael Niedermayer avfilter/vf_signature: use av_strlcpy() Fixes: out of array access Found-by: Kira Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35eeff30caf34df835206f1c12bcf4b7c2bd6758 --- libavfilter/vf_signature.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index f0078ba1a6..d07b213f31 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -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); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog