summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunrong Guo <chunrong.guo@nxp.com>2018-07-05 17:41:55 +0800
committerOtavio Salvador <otavio@ossystems.com.br>2018-07-05 15:26:16 -0300
commitd1b426bcbbc4a157f2060a39b44b8a14181a8379 (patch)
tree0c1ce54dab183a43767e13536a5e27aa2d0218c1
parent75dad1e56c8f566c36a52b987ed0aa49a1167384 (diff)
downloadmeta-freescale-d1b426bcbbc4a157f2060a39b44b8a14181a8379.tar.gz
optee-client-qoriq: GCC 8 format-truncation error
*Fix the below error: |libteec/src/teec_trace.c:110:24: error: '%s' directive output may be truncated |writing up to 255 bytes into a region of size 246 [-Werror=format-truncation=] Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> (cherry picked from commit 0368b34d0d593de5d6e3a8770d5c80e4ed43c1ab)
-rw-r--r--recipes-security/optee/optee-client-qoriq.bb1
-rw-r--r--recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch35
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-security/optee/optee-client-qoriq.bb b/recipes-security/optee/optee-client-qoriq.bb
index 24fa2874b..0a76743b9 100644
--- a/recipes-security/optee/optee-client-qoriq.bb
+++ b/recipes-security/optee/optee-client-qoriq.bb
@@ -8,6 +8,7 @@ inherit pythonnative systemd
8 8
9SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client;nobranch=1 \ 9SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client;nobranch=1 \
10 file://0001-Respect-LDFLAGS-set-from-OE-build.patch \ 10 file://0001-Respect-LDFLAGS-set-from-OE-build.patch \
11 file://0001-GCC-8-format-truncation-error.patch \
11" 12"
12S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"
13 14
diff --git a/recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch b/recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch
new file mode 100644
index 000000000..f58590c3d
--- /dev/null
+++ b/recipes-security/optee/optee-client-qoriq/0001-GCC-8-format-truncation-error.patch
@@ -0,0 +1,35 @@
1From 05f741c1e6263bec2977901abe61463b7f8175ad Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <chunrong.guo@nxp.com>
3Date: Fri, 22 Jun 2018 11:58:09 +0800
4Subject: [PATCH] GCC 8 format-truncation error
5
6Signed-off-by: BJ DevOps Team <bjdevops@NXP1.onmicrosoft.com>
7---
8 libteec/src/teec_trace.c | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/libteec/src/teec_trace.c b/libteec/src/teec_trace.c
12index 78b79d6..7901deb 100644
13--- a/libteec/src/teec_trace.c
14+++ b/libteec/src/teec_trace.c
15@@ -73,7 +73,7 @@ int _dprintf(const char *function, int flen, int line, int level,
16 const char *prefix, const char *fmt, ...)
17 {
18 char raw[MAX_PRINT_SIZE];
19- char prefixed[MAX_PRINT_SIZE];
20+ char prefixed[MAX_PRINT_SIZE + 10];
21 char *to_print = NULL;
22 const char *func;
23 int err;
24@@ -106,7 +106,7 @@ int _dprintf(const char *function, int flen, int line, int level,
25 */
26 int thread_id = syscall(SYS_gettid); /* perf issue ? */
27
28- snprintf(prefixed, MAX_PRINT_SIZE,
29+ snprintf(prefixed, MAX_PRINT_SIZE + 10,
30 "%s [%d] %s:%s:%d: %s",
31 trace_level_strings[level], thread_id, prefix, func,
32 line, raw);
33--
341.8.3.1
35