lkml.org 
[lkml]   [2004]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectFix UDF-FS potentially dereferencing null
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.051 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site