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:	Fri, 13 Sep 2013 15:56:05 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Jens Axboe <axboe@...nel.dk>, Jeff Moyer <jmoyer@...hat.com>,
	Ramprasad Chinthekindi <rchinthekindi@...c-inc.com>,
	Akhil Bhansali <abhansali@...c-inc.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [patch 3/4] skd: use strncpy() as a cleanup

On Fri, Sep 13, 2013 at 02:03:23PM +0200, Geert Uytterhoeven wrote:
> On Fri, Sep 13, 2013 at 10:05 AM, Dan Carpenter
> > +       strncpy(inq.driver_version, DRV_VER_COMPL,
> > +               min(sizeof(inq.driver_version), strlen(DRV_VER_COMPL)));
> 
> This does the exact same thing as memcpy(), right? So why not use that?
> memcpy() has much simpler semantics than strncpy().

You're right.  I've redone this.

regards,
dan carpenter

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ