mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-29 10:11:49 -04:00
BUG/MINOR: Reset errno variable before calling strtol(3)
Sometimes errno != 0 before calling strtol(3) [wt: this needs to be backported to 1.7]
This commit is contained in:
parent
b732321d03
commit
77ee7526de
1 changed files with 1 additions and 0 deletions
|
|
@ -2814,6 +2814,7 @@ const char *update_server_addr_port(struct server *s, const char *addr, const ch
|
|||
port_change_required = 0;
|
||||
|
||||
sign = *port;
|
||||
errno = 0;
|
||||
new_port = strtol(port, &endptr, 10);
|
||||
if ((errno != 0) || (port == endptr)) {
|
||||
chunk_appendf(msg, "problem converting port '%s' to an int", port);
|
||||
|
|
|
|||
Loading…
Reference in a new issue