[<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