projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f2b3f9
)
BUG/MEDIUM: listeners: Use the right parameters for strlcpy2().
author
Olivier Houchard
<cognet@ci0.org>
Sat, 8 Apr 2023 12:58:53 +0000
(14:58 +0200)
committer
Olivier Houchard
<cognet@ci0.org>
Sat, 8 Apr 2023 13:01:57 +0000
(15:01 +0200)
When calls to strcpy() were replaced with calls to strlcpy2(), one of them
was replaced wrong, and the source and size were inverted. Correct that.
This should fix issue #2110.
src/proto_tcp.c
patch
|
blob
|
history
diff --git
a/src/proto_tcp.c
b/src/proto_tcp.c
index
30c2e11
..
4691e16
100644
(file)
--- a/
src/proto_tcp.c
+++ b/
src/proto_tcp.c
@@
-709,7
+709,7
@@
int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen)
if (listener->bind_conf->options & BC_O_DEF_ACCEPT) {
struct accept_filter_arg accept;
memset(&accept, 0, sizeof(accept));
- strlcpy2(accept.af_name, sizeof(accept.af_name), "dataready");
+ strlcpy2(accept.af_name, "dataready", sizeof(accept.af_name));
if (setsockopt(fd, SOL_SOCKET, SO_ACCEPTFILTER, &accept, sizeof(accept)) == -1) {
chunk_appendf(msg, "%scannot enable ACCEPT_FILTER", msg->data ? ", " : "");
err |= ERR_WARN;