]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.
authorSeth Goldberg <seth.goldberg@oracle.com>
Thu, 12 Jan 2012 21:20:29 +0000 (22:20 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 12 Jan 2012 21:20:29 +0000 (22:20 +0100)
ChangeLog
grub-core/lib/arg.c

index 6aa1a8a59748c771116e580c0215ec963ef7d04b..62dbd3788dd5674c79a3d0ab3817972a4bdc9496 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-12  Seth Goldberg <seth.goldberg@oracle.com>
+
+       * grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.
+
 2012-01-12  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Fix handling of wide characters in gfxterm.
index a8a508384bd88d2cedcd7bc4e5407a0051c4b519..e6e88c461722f198d2e56313d3b27dd92e851570 100644 (file)
@@ -332,7 +332,7 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
          opt = find_long (cmd->options, arg + 2, arglen);
 
          if (!option && argv[curarg + 1] && argv[curarg + 1][0] != '-'
-             && opt->type != ARG_TYPE_NONE)
+             && opt && opt->type != ARG_TYPE_NONE)
            option = argv[++curarg];
 
          if (!opt && (cmd->cmd->flags & GRUB_COMMAND_ACCEPT_DASH))