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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 13 Dec 2008 19:48:45 +0300
From:	Gregory Petrosyan <gregory.petrosyan@...il.com>
To:	Giangiacomo Mariotti <giangiacomo.mariotti@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Misuse of sizeof

On Sat, Dec 13, 2008 at 05:31:06PM +0100, Giangiacomo Mariotti wrote:
> IMO there's a bug in the use of sizeof in /arch/x86/boot/main.c, it's
> also a strange style.

> -	BUILD_BUG_ON(sizeof boot_params != 4096);
> -	memcpy(&boot_params.hdr, &hdr, sizeof hdr);
> +	BUILD_BUG_ON(sizeof(boot_params) != 4096);
> +	memcpy(&boot_params.hdr, &hdr, sizeof(hdr));

The 'sizeof xxx' style is perfectly valid.

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