net-misc/telnet-bsd: Fix compilation with format-security
authorThomas Deutschmann <whissi@gentoo.org>
Sun, 3 Dec 2017 00:54:02 +0000 (01:54 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Sun, 3 Dec 2017 01:37:58 +0000 (02:37 +0100)
Package-Manager: Portage-2.3.16, Repoman-2.3.6

net-misc/telnet-bsd/Manifest
net-misc/telnet-bsd/files/telnet-bsd-1.2-format-security.patch [new file with mode: 0644]
net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild

index 6768f2a287ecae4d6a8c4e01c545219fae1ee805..3e3812213114c8573bf1602351dcfc0e8d0e6b33 100644 (file)
@@ -1 +1 @@
-DIST telnet-bsd-1.2.tar.bz2 194518 SHA256 d6a9d26740ef75565cb1ed8ff11e327d240e6734748b2d1d2e96c126849e4733 SHA512 e3867362e1a2bc46779bcbc7631ccf08a0bfae84b71653e39099dc2db42995e5fcd39a978595006053e688430445db7ebb7a7bfbbb02a8e4dba209acbf66a69d WHIRLPOOL 673a5178f7c2305c9ad1ece9151d8d6c874ace147640f2d0e02a39f2641935af02fe42861c9ccc17b9f84e328c7e821f93ecf37dc3a86a9d1cf49700e7527f20
+DIST telnet-bsd-1.2.tar.bz2 194518 BLAKE2B 59b46a4717dfbf2dffebbab96446ec020da1fab4838bae053e5539f3f85834e11f304ad9f8cb143aefb73cb3c6c0734430a4317df6e8a9a236a122a1268f3bd8 SHA512 e3867362e1a2bc46779bcbc7631ccf08a0bfae84b71653e39099dc2db42995e5fcd39a978595006053e688430445db7ebb7a7bfbbb02a8e4dba209acbf66a69d
diff --git a/net-misc/telnet-bsd/files/telnet-bsd-1.2-format-security.patch b/net-misc/telnet-bsd/files/telnet-bsd-1.2-format-security.patch
new file mode 100644 (file)
index 0000000..b167bce
--- /dev/null
@@ -0,0 +1,52 @@
+--- a/telnet/utilities.c
++++ b/telnet/utilities.c
+@@ -739,22 +739,22 @@ printsub(char direction, unsigned char *pointer, int length)
+               case ENV_VAR:
+                 if (pointer[1] == TELQUAL_SEND)
+                   goto def_case;
+-                fprintf(NetTrace, "\" VAR " + noquote);
++                fprintf(NetTrace, "%s", "\" VAR " + noquote);
+                 noquote = 2;
+                 break;
+ 
+               case ENV_VALUE:
+-                fprintf(NetTrace, "\" VALUE " + noquote);
++                fprintf(NetTrace, "%s", "\" VALUE " + noquote);
+                 noquote = 2;
+                 break;
+ 
+               case ENV_ESC:
+-                fprintf(NetTrace, "\" ESC " + noquote);
++                fprintf(NetTrace, "%s", "\" ESC " + noquote);
+                 noquote = 2;
+                 break;
+ 
+               case ENV_USERVAR:
+-                fprintf(NetTrace, "\" USERVAR " + noquote);
++                fprintf(NetTrace, "%s", "\" USERVAR " + noquote);
+                 noquote = 2;
+                 break;
+ 
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -897,17 +897,17 @@ printsub(char direction, unsigned char *pointer, int length)
+                       case ENV_VAR:
+                           if (pointer[1] == TELQUAL_SEND)
+                               goto def_case;
+-                          netoprintf("\" VAR " + noquote);
++                          netoprintf("%s", "\" VAR " + noquote);
+                           noquote = 2;
+                           break;
+ 
+                       case ENV_VALUE:
+-                          netoprintf("\" VALUE " + noquote);
++                          netoprintf("%s", "\" VALUE " + noquote);
+                           noquote = 2;
+                           break;
+ 
+                       case ENV_ESC:
+-                          netoprintf("\" ESC " + noquote);
++                          netoprintf("%s", "\" ESC " + noquote);
+                           noquote = 2;
+                           break;
+ 
index 6b62c3f281713eb2e790f927b4be426c4c891585..562cbb582529ed8fcb3dc265774d9f16929b0566 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -21,6 +21,7 @@ DEPEND="${RDEPEND}
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-fbsd.patch
+       epatch "${FILESDIR}"/${PN}-1.2-format-security.patch
        eaclocal
        eautoreconf
 }