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>] [day] [month] [year] [list]
Date:	Fri, 09 Nov 2012 02:25:20 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	mankad.maulik@...il.com
Cc:	ming.lei@...onical.com, gregkh@...uxfoundation.org,
	oneukum@...e.de, netdev@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v4 3/5] usbnet: smsc95xx: fix memory leak in
 smsc95xx_suspend

From: Maulik Mankad <mankad.maulik@...il.com>
Date: Fri, 9 Nov 2012 12:28:17 +0530

> We don't need memset() here.
> May be command[2] = {0}; offset[2] = {0}; crc[4] = {0}; is enough.

The compiler can see this an will eliminate the unnecessary
clears.

So it's better to use memset and make the code much clearer
and easier to audit.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists