commit | 77ee7526deab920a2846d35365392127596ccd8f | [log] [tgz] |
---|---|---|
author | Ryabin Sergey <m3tac0ma@gmail.com> | Wed Jan 11 19:39:55 2017 +0400 |
committer | Willy Tarreau <w@1wt.eu> | Wed Jan 11 21:30:07 2017 +0100 |
tree | 591da15881b3f022eec140955ae176e5148b8122 | |
parent | b732321d03ea0bb3a27bf96fd353d12c1485a4bb [diff] |
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]
diff --git a/src/server.c b/src/server.c index f23b938..0decb82 100644 --- a/src/server.c +++ b/src/server.c
@@ -2814,6 +2814,7 @@ 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);