mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
BUG/MEDIUM: listeners: Use the right parameters for strlcpy2().
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.
This commit is contained in:
parent
7f2b3f9431
commit
0963b8a07f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user