mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
* grub-core/fs/fshelp.c (find_file): Save ctx->next when calling
find_file recursively for symlink.
This commit is contained in:
1 parent
8b3e6eb6b6
commit
1397f0b520
2 files changed
+8
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user