]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/arg.c (grub_arg_show_help): Fix a NULL pointer
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 29 Apr 2013 09:57:51 +0000 (11:57 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 29 Apr 2013 09:57:51 +0000 (11:57 +0200)
dereference.
Reported by: qwertial.

ChangeLog
grub-core/lib/arg.c

index 32a2a8e2ab1570d2550b51be03de02cc3b852f7e..41a941cb75b422372888104b60580f8d7abf69a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-29  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/lib/arg.c (grub_arg_show_help): Fix a NULL pointer
+       dereference.
+       Reported by: qwertial.
+
 2013-04-28  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * docs/grub.texi: Add a comment about usefullness of nativedisk.
index 7492ac6a8f246eefe5db904e1bc330b1627db1a3..9cc18dc2e5a7b5d4021550f52ed19d853c6decf7 100644 (file)
@@ -158,7 +158,7 @@ grub_arg_show_help (grub_extcmd_t cmd)
   show_usage (cmd);
   grub_printf ("%s\n\n", _(cmd->cmd->description));
 
-  for (opt = cmd->options; opt->doc; opt++)
+  for (opt = cmd->options; opt && opt->doc; opt++)
     switch (opt->shortarg)
       {
       case 'h':