[FFmpeg-devel] [PATCH 08/11] avfilter/vf_signature: use av_strlcpy instead of strcpy

Michael Niedermayer michael at niedermayer.cc
Tue Jun 13 01:15:19 EEST 2017


On Sun, Jun 11, 2017 at 04:05:50PM +0200, Timo Rothenpieler wrote:
> Fixes CID 1403236
> ---
>  libavfilter/vf_signature.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c
> index f0078ba1a6..c20b0bfabb 100644
> --- a/libavfilter/vf_signature.c
> +++ b/libavfilter/vf_signature.c
> @@ -576,7 +576,7 @@ 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);
> +        av_strlcpy(filename, sic->filename, sizeof(filename));

missing error handling, if its truncated
but better than before, so patch ok

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170613/44b6a543/attachment.sig>


More information about the ffmpeg-devel mailing list