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, 3 Aug 2017 09:39:15 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Matthias Kaehlcke <mka@...omium.org>
Cc:     Minchan Kim <minchan@...nel.org>, Nitin Gupta <ngupta@...are.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-mm@...ck.org, Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

Hi,

On Thu, Aug 3, 2017 at 9:33 AM, Matthias Kaehlcke <mka@...omium.org> wrote:
> comp_algorithm_store() passes the size of the source buffer to strlcpy()
> instead of the destination buffer size. Make it explicit that the two
> buffers have the same size and use strcpy() instead of strlcpy().
> The latter can be done safely since the function ensures that the string
> in the source buffer is terminated.
>
> Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> ---
> Changes in v2:
> - make destination buffer explicitly of the same size as source buffer
> - use strcpy() instead of strlcpy()
> - updated subject and commit message
>
>  drivers/block/zram/zram_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Looks great.  Commit message could be explicit that this change fixes
no bugs and is mostly a no-op (strcpy may be slightly faster than
strlcpy), but I guess that's obvious to anyone looking at the patch.

Reviewed-by: Douglas Anderson <dianders@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ