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

* Re: [patch] deadloop in grub_ext2_iterate_dir
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Zielcke @ 2009-10-17 12:54 UTC (permalink / raw)
  To: The development of GRUB 2

Am Samstag, den 17.10.2009, 16:17 +0400 schrieb Vasily Averin:
> +      if (grub_le_to_cpu16 (dirent.direntlen) == 0)
> +        return 0;
> +
>        if (dirent.namelen != 0) 

For consistency we should either always use the grub_Xe_to_cpuYZ
functions or never when checking for a 0 value.

Oh and in my first reply I forgot to tell you, that we prefer to have
GNU Changelog entries sent along with patches.
A git Signed-off-by line is useless. We use SVN not git as our main
repository.

-- 
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer




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

* Re: [patch] deadloop in grub_ext2_iterate_dir
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Millan @ 2009-10-24 23:37 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: phcoder

On Sat, Oct 17, 2009 at 04:17:52PM +0400, Vasily Averin wrote:
> fix for deadloop in grub_ext2_iterate_dir:
> fpos is not updated if dirent.direntlen == 0

Committed, thanks.

On Sat, Oct 17, 2009 at 02:54:24PM +0200, Felix Zielcke wrote:
> For consistency we should either always use the grub_Xe_to_cpuYZ
> functions or never when checking for a 0 value.

I've set it to keep not using it.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ 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.