From b2574799d14e45ad1b43e8dfd1099fd8cf9b5420 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 17 Oct 2016 18:32:35 -0500 Subject: The recent --help infrastructure fiddling made "toybox --help unknown" segfault because lookup failure left this->which NULL and error_exit() dereferenced it. (Oops.) --- main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'main.c') diff --git a/main.c b/main.c index 5a2a272d..07fd3415 100644 --- a/main.c +++ b/main.c @@ -70,6 +70,7 @@ static const int NEED_OPTIONS = static void unknown(char *name) { toys.exitval = 127; + toys.which = toy_list; error_exit("Unknown command %s", name); } -- cgit v1.2.3