mirror of https://github.com/vitalif/e2fsprogs
ChangeLog, dirblock.c:
dirblock.c (ext2fs_read_dir_block): Fix a potential case where we may overrun allocated memory in case of a corrupted filesystem (or an e2fsck test case :-) when byte-swapping the directory block.bitmap-optimize
parent
cdaf1fa78f
commit
e446d71838
|
@ -1,5 +1,10 @@
|
|||
2001-01-05 <tytso@snap.thunk.org>
|
||||
|
||||
* dirblock.c (ext2fs_read_dir_block): Fix a potential case where
|
||||
we may overrun allocated memory in case of a corrupted
|
||||
filesystem (or an e2fsck test case :-) when byte-swapping
|
||||
the directory block.
|
||||
|
||||
* ext2fs.h: Indent the #warning to fix gcc -Wall complaint.
|
||||
|
||||
* mkjournal.c (ext2fs_add_journal_device): Fix various gcc -Wall
|
||||
|
|
|
@ -39,7 +39,7 @@ errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
|
|||
return 0;
|
||||
p = (char *) buf;
|
||||
end = (char *) buf + fs->blocksize;
|
||||
while (p < end) {
|
||||
while (p < end-8) {
|
||||
dirent = (struct ext2_dir_entry *) p;
|
||||
dirent->inode = ext2fs_swab32(dirent->inode);
|
||||
dirent->rec_len = ext2fs_swab16(dirent->rec_len);
|
||||
|
|
Loading…
Reference in New Issue