mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-31 06:23:52 +00:00
Fix #2366
This commit is contained in:
+1
-1
@@ -673,7 +673,7 @@ manager_recv_cb(EV_P_ ev_io *w, int revents)
|
||||
}
|
||||
|
||||
size_t pos = strlen(buf);
|
||||
strcpy(buf + pos - 1, "\n]"); // Remove trailing ","
|
||||
strcpy(buf + max(pos - 1, 1), "\n]"); // Remove trailing ","
|
||||
pos = strlen(buf);
|
||||
if (sendto(manager->fd, buf, pos, 0, (struct sockaddr *)&claddr, len)
|
||||
!= pos) {
|
||||
|
||||
Reference in New Issue
Block a user