diff --git a/ChangeLog b/ChangeLog index 1e3176e63..ec7b556d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-09 Vladimir Serbinenko + + * grub-core/fs/cpio.c (grub_cpio_dir): Fix a bug with multiple listing. + Explicitly init restart while on it. + 2012-02-09 Vladimir Serbinenko * grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid diff --git a/grub-core/fs/cpio.c b/grub-core/fs/cpio.c index bfaf14101..1065df94a 100644 --- a/grub-core/fs/cpio.c +++ b/grub-core/fs/cpio.c @@ -539,7 +539,7 @@ grub_cpio_dir (grub_device_t device, const char *path_in, if (p) *p = 0; - if (((!prev) || (grub_strcmp (prev, n) != 0)) && *n != 0) + if (((!prev) || (grub_strcmp (prev, name) != 0)) && *n != 0) { struct grub_dirhook_info info; grub_memset (&info, 0, sizeof (info)); @@ -554,7 +554,7 @@ grub_cpio_dir (grub_device_t device, const char *path_in, } else { - int restart; + int restart = 0; err = handle_symlink (data, name, &path, mode, &restart); grub_free (name); if (err)