summaryrefslogtreecommitdiffstats
path: root/recipes-security
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:25:06 -0300
commit0368b34d0d593de5d6e3a8770d5c80e4ed43c1ab (patch)
treede9de40eccd348f87c07b6dd33d697b458fcdf83 /recipes-security
parent5556f6f8352aa20cd916c7be5ed72628f5769fc2 (diff)
downloadmeta-freescale-0368b34d0d593de5d6e3a8770d5c80e4ed43c1ab.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>
Diffstat (limited to 'recipes-security')
-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 24fa2874..0a76743b 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 00000000..f58590c3
--- /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