#3 -p option causes segfault

open
nobody
None
5
2007-04-08
2007-04-08
James Hanley
No

line 831
c = getopt_long(argc, argv, "hTtEe:a:b:c:d:f:g:i:k:l:n:o:pq::u:w:y:z:A:B:C:D:F:G:H:I:J:K:L:MN:QR:S:U:WXV:ZP 0xAA: 0xAB: 0xAC: 0xAD: 0xAE: 0xAF: 0xB0: 0xB1: 0 xB2: 0xB3: 0xB4: 0xB5: 0xB6:", long_options, &option_index);

should read:
c = getopt_long(argc, argv, "hTtEe:a:b:c:d:f:g:i:k:l:n:o:p:q:u:w:y:z:A:B:C:D:F:G:H:I:J:K:L:MN:QR:S:U:WXV:ZP 0xAA: 0xAB: 0xAC: 0xAD: 0xAE: 0xAF: 0xB0: 0xB1: 0 xB2: 0xB3: 0xB4: 0xB5: 0xB6:", long_options, &option_index);

Note the "::" in the previous line. This causes -p to set its optarg to NULL, and causes a seg fault later.

Discussion