diff --git a/ChangeLog b/ChangeLog index 380dacffd..80c593e4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-25 Robert Millan +2009-10-25 Vasily Averin + + * fs/ext2.c (grub_ext2_iterate_dir): Avoid infinite loop when + `dirent.direntlen == 0'. + 2009-10-25 Robert Millan * fs/cpio.c [MODE_USTAR]: Initialize `tar' module instead of diff --git a/fs/ext2.c b/fs/ext2.c index 0341680ea..8d8c6939e 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -649,6 +649,9 @@ grub_ext2_iterate_dir (grub_fshelp_node_t dir, if (grub_errno) return 0; + if (dirent.direntlen == 0) + return 0; + if (dirent.namelen != 0) { char filename[dirent.namelen + 1];