Fix top(1) long options handling
getopt_long(3) requires the long options be terminated by a NULL block. Without the terminator, an invalid long option results in a segmentation fault. Reported by: Brandon Bergren MFC after: 1 week
This commit is contained in:
parent
be659d72bb
commit
61ef814f56
@ -110,7 +110,8 @@ static const struct option longopts[] = {
|
||||
{ "uids", no_argument, NULL, 'u' },
|
||||
{ "version", no_argument, NULL, 'v' },
|
||||
{ "swap", no_argument, NULL, 'w' },
|
||||
{ "system-idle-procs", no_argument, NULL, 'z' }
|
||||
{ "system-idle-procs", no_argument, NULL, 'z' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user