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:	Mon, 11 Aug 2014 22:36:26 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Oleg Drokin <oleg.drokin@...el.com>,
	devel@...verdev.osuosl.org,
	Andreas Dilger <andreas.dilger@...el.com>,
	Liang Zhen <liang.zhen@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ann Koehler <amk@...y.com>
Subject: Re: [PATCH] staging: lustre: lustre: ptlrpc: nrs.c: Cleaning up
 missing null-terminate after strncpy call

2014-08-11 12:58 GMT+02:00 Dan Carpenter <dan.carpenter@...cle.com>:
> On Sun, Aug 10, 2014 at 01:49:12AM +0200, Rickard Strandqvist wrote:
>> Added a guaranteed null-terminate after call to strncpy.
>
> No.  This is a problem in the static checker and not in the code.
>
> Look at the start of the function.  This stuff should be obvious for the
> static checker.
>
> regards,
> dan carpenter
>

Hi Dan

Okay, no, it was me who missed it, not cppcheck.

Ensuring that from string will fit was an unusual solution.
If I see code where an effort is made to ensure that no more than x
characters copied I react to it.
But it is zeroing of the string you were looking for then. Ok sorry :-(

Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists