[BUGFIX] Isofs bug

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Mon, 11 Jan 1999 23:54:19 +0100


Hello.

I have probably found a bug in ISOFS. ISOFS might sometimes translate name in isofs_find_entry()
directly into buffer which can cause problems (actually one friend of mine already had problems
with it). I made a short patch so that isofs_find_dentry() is now translating name in allocated
page and not into the buffer (it was already doing this when there was some mapping turned on..).

Honza

------------- CUT ME HERE --------------
--- linux/fs/isofs/namei.c Sun Jan 10 00:22:10 1999
+++ linux/fs/isofs/namei.c Sun Jan 10 00:24:56 1999
@@ -161,6 +161,7 @@

if (dir->i_sb->u.isofs_sb.s_rock ||
dir->i_sb->u.isofs_sb.s_joliet_level ||
+ dir->i_sb->u.isofs_sb.s_mapping == 'n' ||
dir->i_sb->u.isofs_sb.s_mapping == 'a') {
if (! page) {
page = (unsigned char *)
@@ -190,12 +191,13 @@
break;
}
if (c == ';') c = '.';
- dpnt[i] = c;
+ page[i] = c;
}
/* This allows us to match with and without
* a trailing period. */
- if(dpnt[dlen-1] == '.' && dentry->d_name.len == dlen-1)
+ if(page[dlen-1] == '.' && dentry->d_name.len == dlen-1)
dlen--;
+ dpnt = page;
}
/*
* Skip hidden or associated files unless unhide is set

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/