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-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd9BkPUDrgg5jsexFD08=d_ExujMSQmDQd0=9sX5CbPpDg@mail.gmail.com>
Date:	Thu, 14 Mar 2013 22:06:45 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	chris@...kel.net, jcmvbkbc@...il.com
Cc:	yongjun_wei@...ndmicro.com.cn, linux-xtensa@...ux-xtensa.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] xtensa: net: fix invalid use of sizeof in iss_net_setup()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
 arch/xtensa/platforms/iss/network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 7d0fea6..da56fec 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -737,7 +737,7 @@ static int iss_net_setup(char *str)
 		return 1;
 	}
 
-	if ((new = alloc_bootmem(sizeof new)) == NULL) {
+	if ((new = alloc_bootmem(sizeof(*new)) == NULL) {
 		printk("Alloc_bootmem failed\n");
 		return 1;
 	}


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