On Tue, Feb 1, 2022 at 8:33 AM Henrik Holst via curl-library
<curl-library@lists.haxx.se> wrote:
>
> did find one low hanging fruit and one interesting strcpy reimplementation:

> --- a/lib/urlapi.c
> +++ b/lib/urlapi.c
> @@ -1005,9 +1005,7 @@ static CURLUcode seturl(const char *url, CURLU *u, 
> unsigned int flags)
>          return CURLUE_NO_HOST;
>      }
>
> -    len = strlen(p);
> -    memcpy(path, p, len);
> -    path[len] = 0;
> +    strcpy(path, p);
>

Did the generated code change on this bit though ? I believe gcc
recognizes both variations (the original and strcpy) and will change
it to stpcpy or memcpy..
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to