grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Francesco Lavra <francescolavra.fl@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: [PATCH] Fix listing of directory contents for root device
Date: Sun, 02 Jun 2013 15:56:39 +0200	[thread overview]
Message-ID: <51AB4F17.4000007@gmail.com> (raw)

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  <francescolavra.fl@gmail.com>

	* 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	other threads:[~2013-06-02 14:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51AB4F17.4000007@gmail.com \
    --to=francescolavra.fl@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).