summaryrefslogtreecommitdiff
path: root/tools/lib
diff options
context:
space:
mode:
authorRong Tao <rongtao@cestc.cn>2023-01-05 17:36:33 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2023-01-06 18:57:23 +0300
commit6d0c4b11e743b84eb57898783e9adecb9083b269 (patch)
tree4b5506b1c1205e7284a1bf479edcf981f597a2f4 /tools/lib
parent6bd4755c7c499dbcef46eaaeafa1a319da583b29 (diff)
downloadlinux-6d0c4b11e743b84eb57898783e9adecb9083b269.tar.xz
libbpf: Poison strlcpy()
Since commit 9fc205b413b3("libbpf: Add sane strncpy alternative and use it internally") introduce libbpf_strlcpy(), thus add strlcpy() to a poison list to prevent accidental use of it. Signed-off-by: Rong Tao <rongtao@cestc.cn> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/bpf/tencent_5695A257C4D16B4413036BA1DAACDECB0B07@qq.com
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/libbpf_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
index e4d05662a96c..fbaf68335394 100644
--- a/tools/lib/bpf/libbpf_internal.h
+++ b/tools/lib/bpf/libbpf_internal.h
@@ -20,8 +20,8 @@
/* make sure libbpf doesn't use kernel-only integer typedefs */
#pragma GCC poison u8 u16 u32 u64 s8 s16 s32 s64
-/* prevent accidental re-addition of reallocarray() */
-#pragma GCC poison reallocarray
+/* prevent accidental re-addition of reallocarray()/strlcpy() */
+#pragma GCC poison reallocarray strlcpy
#include "libbpf.h"
#include "btf.h"