mirror of
https://github.com/markqvist/tncattach
synced 2026-08-12 17:40:17 -04:00
tncattach
- WHen parsing the `prefixPart_s` (the prefix length), only continue if the text is a number, if not then bail out with an error
This commit is contained in:
parent
c6585c242e
commit
6830ddad67
1 changed files with 4 additions and 0 deletions
|
|
@ -504,6 +504,10 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
|
|||
|
||||
long prefixLen_l = strtol(prefixPart_s, NULL, 10); // TODO: Add handling here for errors (using errno)
|
||||
|
||||
if(prefixLen_l == 0) {
|
||||
printf("Prefix length '%s' is not numeric\n", prefixPart_s);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
arguments->ipv6 = ipPart_s;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue