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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 9 Mar 2010 22:14:58 +0100 (CET)
From:	Julia Lawall <julia@...u.dk>
To:	Greg Kroah-Hartman <gregkh@...e.de>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH 4/5] drivers/staging/otus: drop redundant memset

From: Julia Lawall <julia@...u.dk>

The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);
// </smpl>

Signed-off-by: Julia Lawall <julia@...u.dk>

---
 drivers/staging/otus/wwrap.c |    1 -
 1 file changed, 1 deletion(-)

diff -u -p a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c
--- a/drivers/staging/otus/wwrap.c
+++ b/drivers/staging/otus/wwrap.c
@@ -955,7 +955,6 @@ int zfLnxCencSendMsg(struct sock *netlin
 	/*ÌîдÊý¾Ý±¨Ïà¹ØÐÅÏ¢*/
 	nlh = NLMSG_PUT(skb, 0, 0, WAI_K_MSG, size-sizeof(*nlh));
 	pos = NLMSG_DATA(nlh);
-	memset(pos, 0, len);
 
 	/*´«Êäµ½Óû§¿Õ¼äµÄÊý¾Ý*/
 	memcpy(pos, msg,  len);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ