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]
Date:   Thu, 16 Dec 2021 09:52:01 -0800
From:   Christoph Hellwig <hch@...radead.org>
To:     Miko Larsson <mikoxyzzz@...il.com>
Cc:     Christoph Hellwig <hch@...radead.org>, 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, Dec 16, 2021 at 04:00:21PM +0100, Miko Larsson wrote:
> 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.

The second one also sounds like a case for memdup_nul.  That adds a
memory allocation, but it keeps all the checking nicely encapsulated,
and the last one should be fine with a plain old mempcy.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ