svp / rpms / socat

Forked from rpms/socat 4 years ago
Clone

Blame SOURCES/socat-1.7.3.3-warn.patch

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