Commit 6d0c4b11 authored by Rong Tao's avatar Rong Tao Committed by Daniel Borkmann

libbpf: Poison strlcpy()

Since commit 9fc205b4("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: default avatarRong Tao <rongtao@cestc.cn>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarStanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/tencent_5695A257C4D16B4413036BA1DAACDECB0B07@qq.com
parent 6bd4755c
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment