]> git.wh0rd.org - dump.git/commitdiff
Bug concerning 'filetype' feature in ext2fs.
authorStelian Pop <stelian@popies.net>
Wed, 17 Nov 1999 22:46:40 +0000 (22:46 +0000)
committerStelian Pop <stelian@popies.net>
Wed, 17 Nov 1999 22:46:40 +0000 (22:46 +0000)
CHANGES
THANKS
dump/traverse.c

diff --git a/CHANGES b/CHANGES
index a04296ac7babb59e001cce562ee085c41f489433..e82ca68a7b060fe3bcb695f23566819a733c43d1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.15 1999/11/11 16:13:57 tiniou Exp $
+$Id: CHANGES,v 1.16 1999/11/17 22:46:40 tiniou Exp $
 
 Changes between versions 0.4b9 and 0.4b10 (released ???????????????)
 ====================================================================
@@ -10,6 +10,11 @@ Changes between versions 0.4b9 and 0.4b10 (released ???????????????)
        and helping me resolve this and other minor libc5 compiling
        glitches.
 
+2.     Fix a problem when dumping a ext2fs with the 'filetype'
+       feature enabled. Thanks to Patrick J. LoPresti 
+       <patl@cag.lcs.mit.edu> for reporting the bug and to
+       Theodore Y. Ts'o <tytso@mit.edu> for providing the patch.
+
 Changes between versions 0.4b8 and 0.4b9 (released November 5, 1999)
 ====================================================================
 
diff --git a/THANKS b/THANKS
index 900d186f0fc13990c4e2794ec151dae709abbb3f..448efd08581252be14491a712e15da9ed65bf83b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.8 1999/11/11 16:13:57 tiniou Exp $
+$Id: THANKS,v 1.9 1999/11/17 22:46:40 tiniou Exp $
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
@@ -28,6 +28,7 @@ Eirik Fuller          eirik@netcom.com
 Henry Katz             hkatz@hkatz.dialup.access.net
 Klaus Kudielka         kkudielk@cacofonix.nt.tuwien.ac.at
 Florian La Roche       florian@jurix.jura.uni-sb.de
+Patrick J. LoPresti    patl@cag.lcs.mit.edu
 Greg Lutz              greglutz@ix.netcom.com
 Eric Maisonobe         virnet@nat.fr
 David Miller           davem@caip.rutgers.edu
@@ -38,6 +39,7 @@ Brent Olson           night@halcyon.com
 Bernhard Sadlowski     sadlowsk@Mathematik.Uni-Bielefeld.DE
 Chris Siebenmann       cks@utcc.utoronto.ca
 Bob Snyder             rsnyder@janet.advsys.com
+Theodore Y. Ts'o       tytso@mit.edu
 Stephen Tweedie                sct@dcs.ed.ac.uk
 Daniel Veillard                Daniel.Veillard@imag.fr
 Jason Venner           jason@idiom.com
index d3f99bfdf2994e681c592579fd046b678225a658..2517e0223bb916482f5419e5171407e074bb2636 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.7 1999/11/02 09:35:56 tiniou Exp $";
+       "$Id: traverse.c,v 1.8 1999/11/17 22:46:43 tiniou Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -698,7 +698,7 @@ convert_dir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *buf,
 
        p = (struct convert_dir_context *)private;
 
-       reclen = EXT2_DIR_REC_LEN(dirent->name_len + 1);
+       reclen = EXT2_DIR_REC_LEN((dirent->name_len & 0xFF) + 1);
        if (((p->offset + reclen - 1) / p->bs) != (p->offset / p->bs)) {
                dp = (struct direct *)(p->buf + p->prev_offset);
                dp->d_reclen += p->bs - (p->offset % p->bs);
@@ -709,8 +709,8 @@ convert_dir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *buf,
        dp->d_ino = dirent->inode;
        dp->d_reclen = reclen;
        dp->d_type = 0;
-       dp->d_namlen = dirent->name_len;
-       strncpy(dp->d_name, dirent->name, dirent->name_len);
+       dp->d_namlen = dirent->name_len & 0xFF;
+       strncpy(dp->d_name, dirent->name, dp->d_namlen);
        dp->d_name[dp->d_namlen] = '\0';
        p->prev_offset = p->offset;
        p->offset += reclen;