1
0
mirror of https://passt.top/passt synced 2024-07-01 23:42:41 +00:00

conf: Reset errno before checking port specifier with strtol(3)

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-10-14 03:08:54 +02:00
parent 9f1724ad1e
commit fc93f97774

1
conf.c
View File

@ -175,6 +175,7 @@ static int conf_ports(struct ctx *c, char optname, const char *optarg,
do {
int i, port;
errno = 0;
port = strtol(p, &sep, 10);
if (sep == p)
break;