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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 7 Apr 2021 17:52:30 -0700 From: Eric Biggers <ebiggers@...nel.org> To: Shreeya Patel <shreeya.patel@...labora.com> Cc: tytso@....edu, adilger.kernel@...ger.ca, jaegeuk@...nel.org, chao@...nel.org, krisman@...labora.com, drosen@...gle.com, yuchao0@...wei.com, linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, linux-fsdevel@...r.kernel.org, kernel@...labora.com, andre.almeida@...labora.com, kernel test robot <lkp@...el.com> Subject: Re: [PATCH v7 1/4] fs: unicode: Use strscpy() instead of strncpy() On Wed, Apr 07, 2021 at 08:18:42PM +0530, Shreeya Patel wrote: > The -Wstringop-truncation warning highlights the unintended > uses of the strncpy function that truncate the terminating NULL > character from the source string. > Unlike strncpy(), strscpy() always null-terminates the destination string, > hence use strscpy() instead of strncpy(). This explanation is a bit misleading. It would be clearer to phrase this in terms of fixing how overly-long strings are handled: start returning an error instead of creating a non-null-terminated string. > > Fixes: 9d53690f0d4e5 (unicode: implement higher level API for string handling) There should be quotes around the commit title here. - Eric
Powered by blists - more mailing lists