]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* fs/reiserfs.c (grub_reiserfs_iterate_dir): Zero out first byte of
authorColin Watson <cjwatson@ubuntu.com>
Tue, 6 Jul 2010 08:51:42 +0000 (09:51 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Tue, 6 Jul 2010 08:51:42 +0000 (09:51 +0100)
entry_name also for entries without stat blocks (e.g. ".."); fixes
corruption of the first entry in a directory.

ChangeLog
fs/reiserfs.c

index 108379321419060ff81ee2f7de3c41b0a7111ddb..714aa308f351995f2e3787636da591de049468e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-06  Colin Watson  <cjwatson@ubuntu.com>
+
+       * fs/reiserfs.c (grub_reiserfs_iterate_dir): Zero out first byte of
+       entry_name also for entries without stat blocks (e.g. ".."); fixes
+       corruption of the first entry in a directory.
+
 2010-07-06  Colin Watson  <cjwatson@ubuntu.com>
 
        * util/grub.d/00_header.in: Process GRUB_THEME and GRUB_BACKGROUND
index 5acd339c5ef7e6ee13894f4a249488f3ae156e6d..e922795540a8e926f76ba2ac6fce949866c40d72 100644 (file)
@@ -929,7 +929,7 @@ grub_reiserfs_iterate_dir (grub_fshelp_node_t item,
                                       "Warning : %s has no stat block !\n",
                                       entry_name);
                       grub_free (entry_item);
-                      continue;
+                      goto next;
                     }
                 }
               if (hook (entry_name, entry_type, entry_item))
@@ -940,6 +940,7 @@ grub_reiserfs_iterate_dir (grub_fshelp_node_t item,
                   goto found;
                 }
 
+next:
               *entry_name = 0; /* Make sure next entry name (which is just
                                   before this one in disk order) stops before
                                   the current one.  */