* 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.
This commit is contained in:
Colin Watson 2010-07-06 09:51:42 +01:00
parent c8c069533f
commit 37582066cd
2 changed files with 8 additions and 1 deletions

View File

@ -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

View 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. */