diff --git a/ChangeLog b/ChangeLog index 12ee155b8..e2eb822e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-02 Vladimir Serbinenko + + * grub-core/fs/fshelp.c (find_file): Save ctx->next when calling + find_file recursively for symlink. + 2013-11-02 Vladimir Serbinenko * tests/util/grub-shell.in: Copy themes. diff --git a/grub-core/fs/fshelp.c b/grub-core/fs/fshelp.c index c6f3fe1df..42bd542bb 100644 --- a/grub-core/fs/fshelp.c +++ b/grub-core/fs/fshelp.c @@ -133,6 +133,7 @@ find_file (const char *currpath, grub_fshelp_node_t currroot, if (ctx->type == GRUB_FSHELP_SYMLINK) { char *symlink; + const char *next; /* Test if the symlink does not loop. */ if (++ctx->symlinknest == 8) @@ -164,8 +165,10 @@ find_file (const char *currpath, grub_fshelp_node_t currroot, } /* Lookup the node the symlink points to. */ + next = ctx->next; find_file (symlink, ctx->oldnode, &ctx->currnode, iterate_dir, read_symlink, ctx); + ctx->next = next; ctx->type = ctx->foundtype; grub_free (symlink);