From: Dave Jones <davej@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
bfennema@falcon.csc.calpoly.edu
Subject: Fix UDF-FS potentially dereferencing null
Date: Fri, 16 Apr 2004 22:41:04 +0100 [thread overview]
Message-ID: <20040416214104.GT20937@redhat.com> (raw)
Move size instantiation after null check for 'dir', nearer
to where its first used.
Dave
--- linux-2.6.5/fs/udf/namei.c~ 2004-04-16 22:38:28.000000000 +0100
+++ linux-2.6.5/fs/udf/namei.c 2004-04-16 22:39:25.000000000 +0100
@@ -159,7 +159,7 @@
char *nameptr;
uint8_t lfi;
uint16_t liu;
- loff_t size = (udf_ext0_offset(dir) + dir->i_size) >> 2;
+ loff_t size;
lb_addr bloc, eloc;
uint32_t extoffset, elen, offset;
struct buffer_head *bh = NULL;
@@ -202,6 +202,8 @@
return NULL;
}
+ size = (udf_ext0_offset(dir) + dir->i_size) >> 2;
+
while ( (f_pos < size) )
{
fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh);
next reply other threads:[~2004-04-16 21:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-16 21:41 Dave Jones [this message]
2004-04-16 21:58 ` Fix UDF-FS potentially dereferencing null Linus Torvalds
2004-04-16 22:00 ` viro
2004-04-16 23:13 ` Jeff Garzik
2004-04-16 23:18 ` Dave Jones
2004-04-16 23:34 ` viro
2004-04-17 0:44 ` Linus Torvalds
2004-04-17 9:50 ` Arjan van de Ven
2004-04-17 10:42 ` Arjan van de Ven
2004-04-17 11:12 ` Ingo Oeser
2004-04-17 17:14 ` Linus Torvalds
2004-04-22 20:29 ` Alexandre Oliva
2004-04-22 20:56 ` Linus Torvalds
2004-04-23 14:00 ` Alexandre Oliva
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=20040416214104.GT20937@redhat.com \
--to=davej@redhat.com \
--cc=bfennema@falcon.csc.calpoly.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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