All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@parallels.com>
To: grub-devel@gnu.org
Cc: phcoder@gmail.com
Subject: [patch] deadloop in grub_ext2_iterate_dir
Date: Sat, 17 Oct 2009 16:17:52 +0400	[thread overview]
Message-ID: <4AD9B5F0.40304@parallels.com> (raw)

[-- 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];

             reply	other threads:[~2009-10-17 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-17 12:17 Vasily Averin [this message]
2009-10-17 12:54 ` [patch] deadloop in grub_ext2_iterate_dir Felix Zielcke
2009-10-24 23:37 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD9B5F0.40304@parallels.com \
    --to=vvs@parallels.com \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.