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] [day] [month] [year] [list]
Date:	Mon, 15 Sep 2014 22:47:07 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	"Elliott, Robert (Server Storage)" <Elliott@...com>
Cc:	"James E.J. Bottomley" <JBottomley@...allels.com>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: scsi_devinfo.c: Cleaning up unnecessarily
 complicated in conjunction with strncpy

2014-09-15 0:38 GMT+02:00 Elliott, Robert (Server Storage) <Elliott@...com>:
>
>
>> -----Original Message-----
>> From: Rickard Strandqvist [mailto:rickard_strandqvist@...ctrumdigital.se]
>> How do you mean?
>>
>> strncpy zeroes throughout the remainder of the string "from" until the
>> length off to_length, or otherwise guaranteed trailing zero characters
>> and a warning is printed.
>>
>> Is not it exactly the functionality that is desired?
>
> Ah, I see that in man 3 strcpy:
>     "If the length of src is less than n, strncpy() pads the
>      remainder of dest with null bytes."
>
> I agree that should work.
>
> ---
> Rob Elliott    HP Server Storage


Hi

Okay, good.
Suspected that there was some misunderstanding :)

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