mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-30 17:04:22 +00:00
netkit-telnet: Fix build with hardening
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> (cherry picked from commit 6b0fb999ac3bacb0e52b03b1198e2ead6ae95ec8) Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
parent
365493fc33
commit
18ddc5ce63
@ -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
|
||||||
|
|
||||||
@ -9,6 +9,7 @@ SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \
|
|||||||
file://Warning-fix-in-the-step-of-install.patch \
|
file://Warning-fix-in-the-step-of-install.patch \
|
||||||
file://telnet-xinetd \
|
file://telnet-xinetd \
|
||||||
file://cross-compile.patch \
|
file://cross-compile.patch \
|
||||||
|
file://0001-telnet-telnetd-Fix-print-format-strings.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
|
EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user