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: <tykjpjsmjnkdfm24thl5auw7m2x6wmopvwtefcpjamxyryiih3@guovfh2cqe5k>
Date: Wed, 13 Nov 2024 21:21:16 -0500
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Daniel Yang <danielyangkang@...il.com>
Cc: "open list:BCACHEFS" <linux-bcachefs@...r.kernel.org>, 
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bcachefs: replace deprecated strncpy with strscpy

On Tue, Nov 12, 2024 at 11:42:48PM -0800, Daniel Yang wrote:
> The function strncpy is deprecated due to not guaranteeing the
> destination buffer will be NULL-terminated. The recommended replacement
> is to use strscpy().

strncpy is correct here, we don't need the output to be nul terminated

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ