Hi,
If you supply an invalid long option with an argument, null pointer
dereference will result. The fix is simple:
--- a/grub-core/lib/arg.c Wed Jan 04 17:38:56 2012 -0800
+++ b/grub-core/lib/arg.c Wed Jan 04 18:59:08 2012 -0800
@@ -351,7 +351,7 @@
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))
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel