* grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.

This commit is contained in:
Seth Goldberg 2012-01-12 22:20:29 +01:00 committed by Vladimir 'phcoder' Serbinenko
parent 3049237440
commit 7e532280bd
2 changed files with 5 additions and 1 deletions

View file

@ -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.

View 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))