diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch b/meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch deleted file mode 100644 index 6f82488772..0000000000 --- a/meta/recipes-kernel/lttng/lttng-modules/0001-fix-strncpy-equals-destination-size-warning.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From cb78974394a9af865e1d2d606e838dbec0de80e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Jeanson <mjeanson@efficios.com> | ||
3 | Date: Mon, 5 Oct 2020 15:31:42 -0400 | ||
4 | Subject: [PATCH 01/16] fix: strncpy equals destination size warning | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Some versions of GCC when called with -Wstringop-truncation will warn | ||
10 | when doing a copy of the same size as the destination buffer with | ||
11 | strncpy : | ||
12 | |||
13 | ‘strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation] | ||
14 | |||
15 | Since we unconditionally write '\0' in the last byte, reduce the copy | ||
16 | size by one. | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | |||
20 | Change-Id: Idb907c9550817a06fc0dffc489740f63d440e7d4 | ||
21 | Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
22 | Signed-off-by: Michael Jeanson <mjeanson@efficios.com> | ||
23 | --- | ||
24 | lttng-syscalls.c | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/lttng-syscalls.c b/lttng-syscalls.c | ||
28 | index 49c0d81b..b43dd570 100644 | ||
29 | --- a/lttng-syscalls.c | ||
30 | +++ b/lttng-syscalls.c | ||
31 | @@ -719,7 +719,7 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, | ||
32 | ev.u.syscall.abi = LTTNG_KERNEL_SYSCALL_ABI_COMPAT; | ||
33 | break; | ||
34 | } | ||
35 | - strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); | ||
36 | + strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN - 1); | ||
37 | ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; | ||
38 | ev.instrumentation = LTTNG_KERNEL_SYSCALL; | ||
39 | chan_table[i] = _lttng_event_create(chan, &ev, filter, | ||
40 | -- | ||
41 | 2.25.1 | ||
42 | |||