diff options
| author | Rob Landley <rob@landley.net> | 2016-10-17 18:32:35 -0500 | 
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2016-10-17 18:32:35 -0500 | 
| commit | b2574799d14e45ad1b43e8dfd1099fd8cf9b5420 (patch) | |
| tree | 8c5c81c04e47bc425fc5cfc03d6b0ac7acff17af | |
| parent | 3a6d31707720cd51c03a722e057acab6c1b959d6 (diff) | |
| download | toybox-b2574799d14e45ad1b43e8dfd1099fd8cf9b5420.tar.gz | |
The recent --help infrastructure fiddling made "toybox --help unknown" segfault
because lookup failure left this->which NULL and error_exit() dereferenced it.
(Oops.)
| -rw-r--r-- | main.c | 1 | 
1 files changed, 1 insertions, 0 deletions
| @@ -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);  } | 
