All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] deadloop in grub_ext2_iterate_dir
@ 2009-10-17 12:17 Vasily Averin
  2009-10-17 12:54 ` Felix Zielcke
  2009-10-24 23:37 ` Robert Millan
  0 siblings, 2 replies; 3+ messages in thread
From: Vasily Averin @ 2009-10-17 12:17 UTC (permalink / raw)
  To: grub-devel; +Cc: phcoder

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

fix for deadloop in grub_ext2_iterate_dir:
fpos is not updated if dirent.direntlen == 0

Signed-off-by: Vasily Averin <vvs@parallels.com>


[-- Attachment #2: diff-grub2-ext2_readdir-20091017 --]
[-- Type: text/plain, Size: 396 bytes --]

diff -up ./fs/ext2.c.e2rdr ./fs/ext2.c
--- ./fs/ext2.c.e2rdr	2009-07-19 17:59:21.000000000 +0400
+++ ./fs/ext2.c	2009-10-17 15:28:11.000000000 +0400
@@ -649,6 +649,9 @@ grub_ext2_iterate_dir (grub_fshelp_node_
       if (grub_errno)
 	return 0;
 
+      if (grub_le_to_cpu16 (dirent.direntlen) == 0)
+        return 0;
+
       if (dirent.namelen != 0)
 	{
 	  char filename[dirent.namelen + 1];

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-24 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-17 12:17 [patch] deadloop in grub_ext2_iterate_dir Vasily Averin
2009-10-17 12:54 ` Felix Zielcke
2009-10-24 23:37 ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.