From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-networking][PATCH 08/13] netkit-telnet: Fix build with hardening
Date: Tue, 27 Jun 2017 19:08:14 -0700 [thread overview]
Message-ID: <20170628020819.17047-8-raj.khem@gmail.com> (raw)
In-Reply-To: <20170628020819.17047-1-raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...1-telnet-telnetd-Fix-print-format-strings.patch | 66 ++++++++++++++++++++++
.../netkit-telnet/netkit-telnet_0.17.bb | 11 ++--
2 files changed, 72 insertions(+), 5 deletions(-)
create mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch
diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch
new file mode 100644
index 000000000..f2f1b12e2
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch
@@ -0,0 +1,66 @@
+From 7a3095d1e9b7c73f9dca56250f433bcfc7cb660e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 27 Jun 2017 10:15:34 -0700
+Subject: [PATCH] telnet/telnetd: Fix print format strings
+
+Fixes build with hardening flags
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ telnet/utilities.cc | 6 +++---
+ telnetd/utility.c | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/telnet/utilities.cc b/telnet/utilities.cc
+index 66839ab..36f0731 100644
+--- a/telnet/utilities.cc
++++ b/telnet/utilities.cc
+@@ -583,17 +583,17 @@ void printsub(int 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;
+
+diff --git a/telnetd/utility.c b/telnetd/utility.c
+index 29b7da1..75314cb 100644
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -909,17 +909,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;
+
+--
+2.13.2
+
diff --git a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb b/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
index 9438adc0f..54a58c8a1 100644
--- a/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb
@@ -5,11 +5,12 @@ LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef"
SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \
- file://To-aviod-buffer-overflow-in-telnet.patch \
- file://Warning-fix-in-the-step-of-install.patch \
- file://telnet-xinetd \
- file://cross-compile.patch \
-"
+ file://To-aviod-buffer-overflow-in-telnet.patch \
+ file://Warning-fix-in-the-step-of-install.patch \
+ file://telnet-xinetd \
+ file://cross-compile.patch \
+ file://0001-telnet-telnetd-Fix-print-format-strings.patch \
+ "
EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
MANMODE=644 MANDIR=${mandir}"
--
2.13.2
next prev parent reply other threads:[~2017-06-28 2:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 2:08 [meta-oe][PATCH 01/13] Add stdint.h for 'UINT16_MAX' Khem Raj
2017-06-28 2:08 ` [meta-oe][PATCH 02/13] networkmanager: Fix build with hardening Khem Raj
2017-06-28 2:08 ` [meta-networking][PATCH 03/13] strongswan: Include stdint.h for uintptr_t Khem Raj
2017-06-28 2:08 ` [meta-oe][PATCH 04/13] umip: Fix buid with hardening Khem Raj
2017-06-28 2:08 ` [meta-oe][PATCH 05/13] gtkperf: Fix build with hardening flags Khem Raj
2017-06-28 2:08 ` [meta-oe][PATCH 06/13] wmiconfig: " Khem Raj
2017-06-28 2:08 ` [meta-networking][PATCH 07/13] netkit-rpc: " Khem Raj
2017-06-28 2:08 ` Khem Raj [this message]
2017-06-28 2:08 ` [meta-networking][PATCH 09/13] ncftp: Upgrade to 3.2.6 Khem Raj
2017-06-28 2:08 ` [meta-oe][PATCH 10/13] lmbench: Fix build with hardening flags Khem Raj
2017-06-28 2:08 ` [meta-gnome][PATCH 11/13] wv: " Khem Raj
2017-06-28 2:08 ` [meta-networking][PATCH 12/13] ippool: Fix build errors found " Khem Raj
2017-06-28 2:08 ` [meta-filesystems][PATCH 13/13] aufs-util: Upgrade to 3.18 Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170628020819.17047-8-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox