diff options
author | Andrii Nakryiko | 2019-07-02 17:16:20 +0200 |
---|---|---|
committer | Daniel Borkmann | 2019-07-03 11:52:45 +0200 |
commit | cdfc7f888c2a355b01308e97c6df108f1c2b64e8 (patch) | |
tree | e5af226c6107e531e09f61aad19520ec392cf483 /samples | |
parent | bpf: fix precision tracking (diff) | |
download | kernel-qcow2-linux-cdfc7f888c2a355b01308e97c6df108f1c2b64e8.tar.gz kernel-qcow2-linux-cdfc7f888c2a355b01308e97c6df108f1c2b64e8.tar.xz kernel-qcow2-linux-cdfc7f888c2a355b01308e97c6df108f1c2b64e8.zip |
libbpf: fix GCC8 warning for strncpy
GCC8 started emitting warning about using strncpy with number of bytes
exactly equal destination size, which is generally unsafe, as can lead
to non-zero terminated string being copied. Use IFNAMSIZ - 1 as number
of bytes to ensure name is always zero-terminated.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Cc: Magnus Karlsson <magnus.karlsson@intel.com>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions