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] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PRAP189MB1897ABBF1EB2124C3F4FD05BC6B62@PRAP189MB1897.EURP189.PROD.OUTLOOK.COM>
Date: Fri, 11 Apr 2025 01:10:24 +0000
From: Tung Quang Nguyen <tung.quang.nguyen@....tech>
To: Kevin Paul Reddy Janagari <kevinpaul468@...il.com>, "jmaloy@...hat.com"
	<jmaloy@...hat.com>, "davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
	<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"horms@...nel.org" <horms@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"tipc-discussion@...ts.sourceforge.net"
	<tipc-discussion@...ts.sourceforge.net>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Removing deprecated strncpy()

>which isn't really convenient for short strings as it may cause performce issues
Typo: /performce/performance
Also please append net-next to [PATCH] in your email subject.
>
>strscpy() is a preffered replacement because it overcomes the limitations of
>strncpy mentioned above
>
>Compile Tested
>Signed-off-by: Kevin Paul Reddy Janagari <kevinpaul468@...il.com>
>---
> net/tipc/link.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/net/tipc/link.c b/net/tipc/link.c index 50c2e0846ea4..4859b3ccc094
>100644
>--- a/net/tipc/link.c
>+++ b/net/tipc/link.c
>@@ -2227,7 +2227,7 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct
>sk_buff *skb,
> 			break;
> 		if (msg_data_sz(hdr) < TIPC_MAX_IF_NAME)
> 			break;
>-		strncpy(if_name, data, TIPC_MAX_IF_NAME);
>+		strscpy(if_name, data, TIPC_MAX_IF_NAME);
Could you please do the same replacement in function tipc_node_get_linkname() (node.c) ?

>
> 		/* Update own tolerance if peer indicates a non-zero value */
> 		if (tipc_in_range(peers_tol, TIPC_MIN_LINK_TOL,
>TIPC_MAX_LINK_TOL)) {
>--
>2.39.5
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ