projects
/
haproxy-2.3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b732321
)
BUG/MINOR: Reset errno variable before calling strtol(3)
author
Ryabin Sergey
<m3tac0ma@gmail.com>
Wed, 11 Jan 2017 15:39:55 +0000
(19:39 +0400)
committer
Willy Tarreau
<w@1wt.eu>
Wed, 11 Jan 2017 20:30:07 +0000
(21:30 +0100)
Sometimes errno != 0 before calling strtol(3)
[wt: this needs to be backported to 1.7]
src/server.c
patch
|
blob
|
history
diff --git
a/src/server.c
b/src/server.c
index
f23b938
..
0decb82
100644
(file)
--- a/
src/server.c
+++ b/
src/server.c
@@
-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);