ChangeLog, inode.c:
inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if the
inode number is zero; if it's zero, return EXT2_ET_BAD_INODE_NUM.
ChangeLog, fsck.c:
fsck.c (load_fs_info): If the pass number field is missing, it needs
to be treated as zero.
libext2fs.texinfo, README:
Update for 1.14 release.
diff --git a/README b/README
index eaeaac5..5fd3da5 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
- This is the new version (1.13) of the second extended file system
+ This is the new version (1.14) of the second extended file system
management programs.
From time to time, I release new versions of e2fsprogs, to fix
diff --git a/doc/libext2fs.texinfo b/doc/libext2fs.texinfo
index 53d899b..4fe80b8 100644
--- a/doc/libext2fs.texinfo
+++ b/doc/libext2fs.texinfo
@@ -1,7 +1,7 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename libext2fs.info
-@settitle The EXT2FS Library (version 1.13)
+@settitle The EXT2FS Library (version 1.14)
@synindex tp fn
@comment %**end of header
@@ -60,8 +60,8 @@
@title The EXT2FS Library
@subtitle The EXT2FS Library
-@subtitle Version 1.13
-@subtitle December 1998
+@subtitle Version 1.14
+@subtitle January 1999
@author by Theodore Ts'o
@@ -101,7 +101,7 @@
@top The EXT2FS Library
-This manual documents the EXT2FS Library, version 1.13.
+This manual documents the EXT2FS Library, version 1.14.
@end ifinfo
diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog
index a6e2c76..7236782 100644
--- a/lib/ext2fs/ChangeLog
+++ b/lib/ext2fs/ChangeLog
@@ -1,3 +1,9 @@
+1999-01-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * inode.c (ext2fs_read_inode, ext2fs_write_inode): Check to see if
+ the inode number is zero; if it's zero, return
+ EXT2_ET_BAD_INODE_NUM.
+
1998-12-30 Theodore Ts'o <tytso@rsts-11.mit.edu>
* initialize.c (ext2fs_initialize): Use EXT2_FIRST_INODE instead
diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
index 7c9c8bc..58c9d5d 100644
--- a/lib/ext2fs/inode.c
+++ b/lib/ext2fs/inode.c
@@ -495,7 +495,7 @@
return 0;
}
}
- if (ino > fs->super->s_inodes_count)
+ if ((ino == 0) || (ino > fs->super->s_inodes_count))
return EXT2_ET_BAD_INODE_NUM;
group = (ino - 1) / EXT2_INODES_PER_GROUP(fs->super);
offset = ((ino - 1) % EXT2_INODES_PER_GROUP(fs->super)) *
@@ -585,7 +585,7 @@
if (!(fs->flags & EXT2_FLAG_RW))
return EXT2_ET_RO_FILSYS;
- if (ino > fs->super->s_inodes_count)
+ if ((ino == 0) || (ino > fs->super->s_inodes_count))
return EXT2_ET_BAD_INODE_NUM;
if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 3810ed7..7880855 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,8 @@
+1999-01-07 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * fsck.c (load_fs_info): If the pass number field is missing, it
+ needs to be treated as zero.
+
1999-01-05 Theodore Ts'o <tytso@rsts-11.mit.edu>
* mke2fs.c (PRS): Allow the user to specify exactly how many
diff --git a/misc/fsck.c b/misc/fsck.c
index 0778d16..30b7426 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -275,7 +275,9 @@
else
fs_last->next = fs;
fs_last = fs;
- if (fs->passno >=0)
+ if (fs->passno < 0)
+ fs->passno = 0;
+ else
old_fstab = 0;
}