From e4b7f404d83a45e1a5314c67855956f14ffa4a10 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 12 Feb 2012 19:00:50 +0100 Subject: [PATCH] * grub-core/kern/corecmd.c (grub_core_cmd_ls): Handle error in parsing device name. --- ChangeLog | 5 +++++ grub-core/kern/corecmd.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 69ac1c095..160f4431c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-12 Vladimir Serbinenko + + * grub-core/kern/corecmd.c (grub_core_cmd_ls): Handle error in parsing + device name. + 2012-02-12 Vladimir Serbinenko * grub-core/fs/ntfs.c (locate_attr): Avoid set in if. diff --git a/grub-core/kern/corecmd.c b/grub-core/kern/corecmd.c index 136c5a365..0ec6bdd28 100644 --- a/grub-core/kern/corecmd.c +++ b/grub-core/kern/corecmd.c @@ -133,6 +133,8 @@ grub_core_cmd_ls (struct grub_command *cmd __attribute__ ((unused)), char *path; device_name = grub_file_get_device_name (argv[0]); + if (grub_errno) + goto fail; dev = grub_device_open (device_name); if (! dev) goto fail;