lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 22 Oct 2018 19:25:58 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     gqjiang@...e.com
Cc:     jon.maloy@...csson.com, ying.xue@...driver.com,
        netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH] tipc: use destination length for copy string

From: Guoqing Jiang <gqjiang@...e.com>
Date: Fri, 19 Oct 2018 12:08:22 +0800

> Got below warning with gcc 8.2 compiler.
> 
> net/tipc/topsrv.c: In function ‘tipc_topsrv_start’:
> net/tipc/topsrv.c:660:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
>   strncpy(srv->name, name, strlen(name) + 1);
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> net/tipc/topsrv.c:660:27: note: length computed here
>   strncpy(srv->name, name, strlen(name) + 1);
>                            ^~~~~~~~~~~~
> So change it to correct length and use strscpy.
> 
> Signed-off-by: Guoqing Jiang <gqjiang@...e.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ