From: Andreas Schwab <schwab@linux-m68k.org>
To: Jesper Juhl <jj@chaosbits.net>
Cc: linux-kernel@vger.kernel.org,
Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Subject: Re: [PATCH][RFC] HPFS: Don't use pointer to out-of-scope array
Date: Fri, 24 Dec 2010 21:45:09 +0100 [thread overview]
Message-ID: <m2mxnuew8a.fsf@whitebox.home> (raw)
In-Reply-To: <alpine.LNX.2.00.1012242020090.28973@swampdragon.chaosbits.net> (Jesper Juhl's message of "Fri, 24 Dec 2010 20:32:33 +0100 (CET)")
Jesper Juhl <jj@chaosbits.net> writes:
> Secondly I fail to see how this code inside the while loop can even work:
>
> if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea->indirect ? 8 : 0), ex + 4))
>
> There is nothing initializing 'ex' which 'ea' points to, so
> 'ea->namelen' and 'ea->indirect' are uninitialized.
The preceding hpfs_ea_read should do it (it reads the first 4 bytes of
ex which aliases ea->namelen and ea->indirect).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2010-12-24 20:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-24 19:32 [PATCH][RFC] HPFS: Don't use pointer to out-of-scope array Jesper Juhl
2010-12-24 20:45 ` Andreas Schwab [this message]
2010-12-24 20:40 ` Jesper Juhl
2011-01-06 22:08 ` Jesper Juhl
2011-03-21 20:28 ` Jesper Juhl
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=m2mxnuew8a.fsf@whitebox.home \
--to=schwab@linux-m68k.org \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.