[packages/telnet] Add patch to fix build with -Werror=format-security
megabajt
megabajt at pld-linux.org
Wed Jan 30 23:21:30 CET 2013
commit 76022502675e9a7062258ea5768316b01d8f0bd6
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date: Wed Jan 30 23:20:44 2013 +0100
Add patch to fix build with -Werror=format-security
netkit-telnet-format-security.patch | 48 +++++++++++++++++++++++++++++++++++++
telnet.spec | 2 ++
2 files changed, 50 insertions(+)
---
diff --git a/telnet.spec b/telnet.spec
index 5063095..61bf99d 100644
--- a/telnet.spec
+++ b/telnet.spec
@@ -24,6 +24,7 @@ Patch3: netkit-%{name}-issue.patch
Patch4: netkit-%{name}-cpp.patch
Patch5: netkit-%{name}-pld_man.patch
Patch6: netkit-%{name}-tinfo.patch
+Patch7: netkit-%{name}-format-security.patch
BuildRequires: libstdc++-devel
BuildRequires: ncurses-devel >= 5.0
BuildRequires: rpmbuild(macros) >= 1.268
@@ -126,6 +127,7 @@ kullanıcıların bağlanabilir.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
%build
# don't use configure macro
diff --git a/netkit-telnet-format-security.patch b/netkit-telnet-format-security.patch
new file mode 100644
index 0000000..2a63758
--- /dev/null
+++ b/netkit-telnet-format-security.patch
@@ -0,0 +1,48 @@
+diff -urN netkit-telnet-0.17/telnet/utilities.cc netkit-telnet-0.17.new/telnet/utilities.cc
+--- netkit-telnet-0.17/telnet/utilities.cc 2013-01-30 23:07:47.000000000 +0100
++++ netkit-telnet-0.17.new/telnet/utilities.cc 2013-01-30 23:16:27.572745445 +0100
+@@ -583,17 +583,17 @@
+ case ENV_VAR:
+ if (pointer[1] == TELQUAL_SEND)
+ goto def_case;
+- fprintf(NetTrace, "\" VAR " + noquote);
++ fputs("\" VAR " + noquote, NetTrace);
+ noquote = 2;
+ break;
+
+ case ENV_VALUE:
+- fprintf(NetTrace, "\" VALUE " + noquote);
++ fputs("\" VALUE " + noquote, NetTrace);
+ noquote = 2;
+ break;
+
+ case ENV_ESC:
+- fprintf(NetTrace, "\" ESC " + noquote);
++ fputs("\" ESC " + noquote, NetTrace);
+ noquote = 2;
+ break;
+
+diff -urN netkit-telnet-0.17/telnetd/utility.c netkit-telnet-0.17.new/telnetd/utility.c
+--- netkit-telnet-0.17/telnetd/utility.c 2013-01-30 23:07:47.000000000 +0100
++++ netkit-telnet-0.17.new/telnetd/utility.c 2013-01-30 23:17:59.775579286 +0100
+@@ -923,17 +923,17 @@
+ 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;
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/telnet.git/commitdiff/76022502675e9a7062258ea5768316b01d8f0bd6
More information about the pld-cvs-commit
mailing list