|
|
9cb2c2 |
diff -Naur socat-1.7.3.3-orig/sysutils.c socat-1.7.3.3/sysutils.c
|
|
|
9cb2c2 |
--- socat-1.7.3.3-orig/sysutils.c 2017-01-08 05:38:53.000000000 -0500
|
|
|
9cb2c2 |
+++ socat-1.7.3.3/sysutils.c 2019-06-24 17:02:56.693056583 -0400
|
|
|
9cb2c2 |
@@ -614,7 +614,7 @@
|
|
|
9cb2c2 |
return -1;
|
|
|
9cb2c2 |
}
|
|
|
9cb2c2 |
|
|
|
9cb2c2 |
- strncpy(ifr.ifr_name, ifname, IFNAMSIZ); /* ok */
|
|
|
9cb2c2 |
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); /* ok */
|
|
|
9cb2c2 |
if (Ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
|
|
|
9cb2c2 |
Info3("ioctl(%d, SIOCGIFINDEX, {\"%s\"}): %s",
|
|
|
9cb2c2 |
s, ifr.ifr_name, strerror(errno));
|
|
|
9cb2c2 |
diff -Naur socat-1.7.3.3-orig/xio-socket.c socat-1.7.3.3/xio-socket.c
|
|
|
9cb2c2 |
--- socat-1.7.3.3-orig/xio-socket.c 2017-01-08 04:56:00.000000000 -0500
|
|
|
9cb2c2 |
+++ socat-1.7.3.3/xio-socket.c 2019-06-24 17:04:48.684491835 -0400
|
|
|
9cb2c2 |
@@ -1710,7 +1710,6 @@
|
|
|
9cb2c2 |
int xiocheckpeer(xiosingle_t *xfd,
|
|
|
9cb2c2 |
union sockaddr_union *pa, union sockaddr_union *la) {
|
|
|
9cb2c2 |
char infobuff[256];
|
|
|
9cb2c2 |
- int result;
|
|
|
9cb2c2 |
|
|
|
9cb2c2 |
#if WITH_IP4
|
|
|
9cb2c2 |
if (xfd->para.socket.dorange) {
|
|
|
9cb2c2 |
@@ -1778,6 +1777,7 @@
|
|
|
9cb2c2 |
#endif /* WITH_TCP || WITH_UDP */
|
|
|
9cb2c2 |
|
|
|
9cb2c2 |
#if (WITH_TCP || WITH_UDP) && WITH_LIBWRAP
|
|
|
9cb2c2 |
+ int result;
|
|
|
9cb2c2 |
result = xio_tcpwrap_check(xfd, la, pa);
|
|
|
9cb2c2 |
if (result < 0) {
|
|
|
9cb2c2 |
char infobuff[256];
|
|
|
9cb2c2 |
diff -Naur socat-1.7.3.3-orig/xio-tun.c socat-1.7.3.3/xio-tun.c
|
|
|
9cb2c2 |
--- socat-1.7.3.3-orig/xio-tun.c 2017-01-06 15:58:40.000000000 -0500
|
|
|
9cb2c2 |
+++ socat-1.7.3.3/xio-tun.c 2019-06-24 17:03:55.276797729 -0400
|
|
|
9cb2c2 |
@@ -106,7 +106,7 @@
|
|
|
9cb2c2 |
memset(&ifr, 0,sizeof(ifr));
|
|
|
9cb2c2 |
|
|
|
9cb2c2 |
if (retropt_string(opts, OPT_TUN_NAME, &tunname) == 0) {
|
|
|
9cb2c2 |
- strncpy(ifr.ifr_name, tunname, IFNAMSIZ); /* ok */
|
|
|
9cb2c2 |
+ strncpy(ifr.ifr_name, tunname, IFNAMSIZ - 1); /* ok */
|
|
|
9cb2c2 |
free(tunname);
|
|
|
9cb2c2 |
} else {
|
|
|
9cb2c2 |
ifr.ifr_name[0] = '\0';
|