summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-03-23 13:48:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-28 12:09:51 +0100
commit5c8972f320318d03b95091f8e14673fb7982d9a4 (patch)
tree8637c572093a91a20e411e65358502ccf76267c4 /meta/recipes-core
parentaf243c0078bf555e3034a12799558cfab667ad7c (diff)
downloadpoky-5c8972f320318d03b95091f8e14673fb7982d9a4.tar.gz
glibc: Replace strncpy with memccpy to fix -Wstringop-truncation.
(From OE-Core rev: 1c8887ec629516333cbe3736bc0f9d24fb08dffe) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch40
-rw-r--r--meta/recipes-core/glibc/glibc_2.27.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch b/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
new file mode 100644
index 0000000000..fa29f4165b
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch
@@ -0,0 +1,40 @@
1From 113e0516fbd3ce18253f0423762416d4c4b38fb0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 22 Mar 2018 17:57:37 -0700
4Subject: [PATCH 29/29] Replace strncpy with memccpy to fix
5 -Wstringop-truncation.
6
7 * nis/nss_nisplus/nisplus-parser.c: Replace strncpy with memcpy to
8 avoid -Wstringop-truncation.
9---
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2018-03/msg00531.html]
12
13 nis/nss_nisplus/nisplus-parser.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c
17index 8dc021e73d..b53284f889 100644
18--- a/nis/nss_nisplus/nisplus-parser.c
19+++ b/nis/nss_nisplus/nisplus-parser.c
20@@ -87,7 +87,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
21 if (len >= room_left)
22 goto no_more_room;
23
24- strncpy (first_unused, numstr, len);
25+ memcpy (first_unused, numstr, len);
26 first_unused[len] = '\0';
27 numstr = first_unused;
28 }
29@@ -103,7 +103,7 @@ _nss_nisplus_parse_pwent (nis_result *result, struct passwd *pw,
30 if (len >= room_left)
31 goto no_more_room;
32
33- strncpy (first_unused, numstr, len);
34+ memcpy (first_unused, numstr, len);
35 first_unused[len] = '\0';
36 numstr = first_unused;
37 }
38--
392.16.2
40
diff --git a/meta/recipes-core/glibc/glibc_2.27.bb b/meta/recipes-core/glibc/glibc_2.27.bb
index 4f6f58ccb1..4a461ab283 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.bb
@@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
43 file://0026-reset-dl_load_write_lock-after-forking.patch \ 43 file://0026-reset-dl_load_write_lock-after-forking.patch \
44 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \ 44 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
45 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \ 45 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
46 file://0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch \
46" 47"
47 48
48NATIVESDKFIXES ?= "" 49NATIVESDKFIXES ?= ""