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]
Message-ID: <504849B4.4050303@suse.cz>
Date:	Thu, 06 Sep 2012 08:59:00 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	Fengguang Wu <fengguang.wu@...el.com>
CC:	linux-serial@...r.kernel.org, Alan Cox <alan@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] serial_core: fix sizeof(pointer)

On 09/06/2012 04:27 AM, Fengguang Wu wrote:
> sizeof when applied to a pointer typed expression gives the
> size of the pointer.
> 
> Generated by: scripts/coccinelle/misc/noderef.cocci
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> ---
> 
>  cocci-output-38612-39d907-serial_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -640,7 +640,7 @@ static void uart_get_info(struct tty_por
>  {
>  	struct uart_port *uport = state->uart_port;
>  
> -	memset(retinfo, 0, sizeof(retinfo));
> +	memset(retinfo, 0, sizeof(*retinfo));

Hmm, what tree is this against? I have:

memset(&tmp, 0, sizeof(tmp));

thanks,
-- 
js
suse labs
--
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