From: Stelian Pop Date: Wed, 17 Nov 1999 22:46:40 +0000 (+0000) Subject: Bug concerning 'filetype' feature in ext2fs. X-Git-Tag: release_0_4b10~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c5886bd7f853af3e68dc239b705d01f99412a693;p=dump.git Bug concerning 'filetype' feature in ext2fs. --- diff --git a/CHANGES b/CHANGES index a04296a..e82ca68 100644 --- 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 + for reporting the bug and to + Theodore Y. Ts'o for providing the patch. + Changes between versions 0.4b8 and 0.4b9 (released November 5, 1999) ==================================================================== diff --git a/THANKS b/THANKS index 900d186..448efd0 100644 --- 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 diff --git a/dump/traverse.c b/dump/traverse.c index d3f99bf..2517e02 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -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 @@ -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;