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