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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 21 Aug 2018 16:13:10 +0100
From:   Tony Finch <dot@...at.at>
To:     Harshit Jain <harshitjain6751@...il.com>
cc:     linux-kernel@...r.kernel.org, Tony Finch <dot@...at.at>
Subject: Re: [PATCH] scripts: unifdef: fix stringop-truncation warning

Harshit Jain <harshitjain6751@...il.com> wrote:

>  /* modify this line */
> -static void Mpass (void) { strncpy(keyword, "if  ", 4); Pelif(); }
> +static void Mpass (void) { memcpy(keyword, "if  ", 4); Pelif(); }

Yes, this is a good improvement, but you also need to update the comment
to match the code.

Tony.
-- 
f.anthony.n.finch  <dot@...at.at>  http://dotat.at/
Wight, Portland, Plymouth: Westerly 3 or 4, occasionally 5 in north. Slight,
occasionally moderate. Drizzle, fog banks. Moderate, occasionally very poor.

Powered by blists - more mailing lists