Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libext2fs: directory iteration mustn't walk off the buffer end
[tools/e2fsprogs.git]
/
lib
/
ext2fs
/
dir_iterate.c
diff --git
a/lib/ext2fs/dir_iterate.c
b/lib/ext2fs/dir_iterate.c
index
589af69
..
0744ee8
100644
(file)
--- a/
lib/ext2fs/dir_iterate.c
+++ b/
lib/ext2fs/dir_iterate.c
@@
-202,7
+202,7
@@
int ext2fs_process_dir_block(ext2_filsys fs,
if (ctx->errcode)
return BLOCK_ABORT;
- while (offset < fs->blocksize) {
+ while (offset < fs->blocksize
- 8
) {
dirent = (struct ext2_dir_entry *) (ctx->buf + offset);
if (ext2fs_get_rec_len(fs, dirent, &rec_len))
return BLOCK_ABORT;