kenzok8-package/shadowsocksr-libev/patches/101-Fix-Werror-sizeof-pointer-memaccess.patch
2023-02-01 19:53:32 +08:00

12 lines
319 B
Diff

--- a/src/local.c
+++ b/src/local.c
@@ -718,7 +718,7 @@ server_recv_cb(EV_P_ ev_io *w, int reven
ss_free(hostname);
} else {
- strncpy(host, ip, sizeof(ip));
+ strncpy(host, ip, INET6_ADDRSTRLEN);
}
}