1
0
mirror of https://github.com/rd235/cado synced 2024-12-27 06:24:11 +01:00

[Cado] fixed a segmentation fault on wrong params

The getopt_long descriptors was not correctly terminated.
To avoid a segmentation fault the list should be terminated
by an array composed of 4 NULLs.
This commit is contained in:
Davide Berardi 2020-01-31 18:01:49 +01:00
parent 14c8d46714
commit c48b6aeeb4

View File

@ -59,7 +59,8 @@ struct option long_options[]={
{"force", no_argument, NULL, 'f'}, {"force", no_argument, NULL, 'f'},
{"verbose", no_argument, NULL, 'v'}, {"verbose", no_argument, NULL, 'v'},
{"setcap", no_argument, NULL, 'v'}, {"setcap", no_argument, NULL, 'v'},
{"scado", no_argument, NULL, 'S'} {"scado", no_argument, NULL, 'S'},
{0,0,0,0}
}; };
void usage(char *progname) { void usage(char *progname) {