+1999-06-21 <tytso@rsts-11.mit.edu>
+
+ * unix.c (main): Add missing space in the disk write-protected
+ message.
+
1999-05-22 <tytso@rsts-11.mit.edu>
* problem.c, problem.h (PR_0_INODE_COUNT_WRONG): Add new problem
if (fd > 2)
break;
if (fd < 0) {
- fprintf(stderr, "ERROR: Couldn't open /dev/null (%s)\n",
+ fprintf(stderr, "ERROR: Couldn't open "
+ "/dev/null (%s)\n",
strerror(errno));
break;
}
printf("Possibly non-existent or swap device?\n");
#ifdef EROFS
else if (retval == EROFS)
- printf("Disk write-protected; use the -n option"
+ printf("Disk write-protected; use the -n option "
"to do a read-only\n"
"check of the device.\n");
#endif
+1999-06-21 <tytso@rsts-11.mit.edu>
+
+ * dir_iterate.c (ext2fs_process_dir_block): Check for corrupted
+ directory entry before calling the callback function.
+ This should prevent some core dumps of insufficiently
+ paranoid callback functions.
+
1999-05-29 <tytso@rsts-11.mit.edu>
* ext2fs.h: Add feature definition for AFS IMAGIC inodes.
while (offset < fs->blocksize) {
dirent = (struct ext2_dir_entry *) (ctx->buf + offset);
+ if (((offset + dirent->rec_len) > fs->blocksize) ||
+ (dirent->rec_len < 8) ||
+ (((dirent->name_len & 0xFF)+8) > dirent->rec_len)) {
+ ctx->errcode = EXT2_ET_DIR_CORRUPTED;
+ return BLOCK_ABORT;
+ }
if (!dirent->inode &&
!(ctx->flags & DIRENT_FLAG_INCLUDE_EMPTY))
goto next;
break;
}
next:
- if (((offset + dirent->rec_len) > fs->blocksize) ||
- (dirent->rec_len < 8) ||
- (((dirent->name_len & 0xFF)+8) > dirent->rec_len)) {
- ctx->errcode = EXT2_ET_DIR_CORRUPTED;
- return BLOCK_ABORT;
- }
offset += dirent->rec_len;
}