I fixed it into using IFNAMSIZ - 1 since the last byte will be
overwritten anyway, and pushed it, thanks!

Joan Lledó, le sam. 11 oct. 2025 12:50:57 +0200, a ecrit:
> From: Joan Lledó <[email protected]>
> 
> ---
>  lwip/iioctl-ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lwip/iioctl-ops.c b/lwip/iioctl-ops.c
> index f1f1a5ba..6dd65497 100644
> --- a/lwip/iioctl-ops.c
> +++ b/lwip/iioctl-ops.c
> @@ -39,7 +39,7 @@ get_if (const char *name)
>    char ifname[IFNAMSIZ];
>    struct netif *netif;
>  
> -  memcpy (ifname, name, IFNAMSIZ - 1);
> +  strncpy (ifname, name, IFNAMSIZ);
>    ifname[IFNAMSIZ - 1] = 0;
>  
>    NETIF_FOREACH(netif)
> -- 
> 2.50.1
> 
> 

-- 
Samuel
<i> ben oui ce serait idiot, mais osb
  -+- m'en fous de faire un truc débile ! -+-

Reply via email to