linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lou Langholtz <ldl@aros.net>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PATCH: fix 2 byte data leak due to padding
Date: Sun, 27 Jul 2003 21:49:22 -0600	[thread overview]
Message-ID: <3F249D42.4010003@aros.net> (raw)
In-Reply-To: <200307272019.h6RKJ1Et029763@hraefn.swansea.linux.org.uk>

Alan Cox wrote:

>diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.6.0-test2/fs/stat.c linux-2.6.0-test2-ac1/fs/stat.c
>--- linux-2.6.0-test2/fs/stat.c	2003-07-14 14:11:56.000000000 +0100
>+++ linux-2.6.0-test2-ac1/fs/stat.c	2003-07-23 16:27:42.000000000 +0100
>@@ -106,7 +106,7 @@
> {
> 	static int warncount = 5;
> 	struct __old_kernel_stat tmp;
>-
>+	
> 	if (warncount > 0) {
> 		warncount--;
> 		printk(KERN_WARNING "VFS: Warning: %s using old stat() call. Recompile your binary.\n",
>@@ -116,6 +116,7 @@
> 		warncount = 0;
> 	}
> 
>+	memset(&tmp, 0, sizeof(struct __old_kernel_stat));
>
Wouldn't it be more clear (better) to use sizeof(tmp) here rather than 
sizeof(struct _old_kernel_stat)?


  reply	other threads:[~2003-07-28  3:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-27 20:19 PATCH: fix 2 byte data leak due to padding Alan Cox
2003-07-28  3:49 ` Lou Langholtz [this message]
2003-07-28 11:32   ` Alan Cox
2003-07-28 11:44     ` Wichert Akkerman
2003-07-28 19:54     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F249D42.4010003@aros.net \
    --to=ldl@aros.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).