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: <20211216160021.1b9e6d87@zenorus.myxoz.lan>
Date:   Thu, 16 Dec 2021 16:00:21 +0100
From:   Miko Larsson <mikoxyzzz@...il.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     minchan@...nel.org, ngupta@...are.org, senozhatsky@...omium.org,
        axboe@...nel.dk, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org
Subject: Re: [PATCH 2/2] zram: zram_drv: replace strlcpy with strscpy

On Thu, 16 Dec 2021 02:14:44 -0800
Christoph Hellwig <hch@...radead.org> wrote:

> On Wed, Dec 15, 2021 at 08:21:28PM +0100, Miko Larsson wrote:
> > strlcpy shouldn't be used; strscpy should be used instead.
> 
> I think the proper API to use here would be kmemdup_nul.

Thanks for the heads-up! That only seems to apply to the assignment of
'file_name'. The usage of strscpy seems to be correct in the other two
cases, though (since they're char arrays.) I suspect I might be wrong
though, since my knowledge of C is shabby at best.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ