grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix listing of directory contents for root device


From: Francesco Lavra
Subject: [PATCH] Fix listing of directory contents for root device
Date: Sun, 02 Jun 2013 15:56:39 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

Since revision 5010, issuing the ls command with a path not including 
the device name results in a NULL pointer dereference. This patch fixes 
the above by reverting one of the three hunks of the patch applied to 
create revision 5010.

Regards,
Francesco

2013-06-02  Francesco Lavra  <address@hidden>

        * grub-core/kern/corecmd.c (grub_core_cmd_ls): Fix handling of paths
        without a device name.

=== modified file 'grub-core/kern/corecmd.c'
--- grub-core/kern/corecmd.c    2013-05-15 08:11:25 +0000
+++ grub-core/kern/corecmd.c    2013-06-02 13:42:53 +0000
@@ -134,7 +134,7 @@
 
       fs = grub_fs_probe (dev);
       path = grub_strchr (argv[0], ')');
-      if (! *path)
+      if (! path)
        path = argv[0];
       else
        path++;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]