Changeset View
Changeset View
Standalone View
Standalone View
net/shadowsocks-libev/files/patch-src_netutils.c
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/netutils.c.orig 2018-01-16 01:25:03 UTC | |||||
+++ src/netutils.c | |||||
@@ -79,7 +79,7 @@ setinterface(int socket_fd, const char *interface_name | |||||
{ | |||||
struct ifreq interface; | |||||
memset(&interface, 0, sizeof(struct ifreq)); | |||||
- strncpy(interface.ifr_name, interface_name, IFNAMSIZ); | |||||
+ strncpy(interface.ifr_name, interface_name, IFNAMSIZ-1); | |||||
int res = setsockopt(socket_fd, SOL_SOCKET, SO_BINDTODEVICE, &interface, | |||||
sizeof(struct ifreq)); | |||||
return res; |