diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-02 18:16:20 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-03 12:52:45 +0300 |
commit | cdfc7f888c2a355b01308e97c6df108f1c2b64e8 (patch) | |
tree | e5af226c6107e531e09f61aad19520ec392cf483 /samples/bpf/do_hbm_test.sh | |
parent | a3ce685dd01a786fa5bc388e47d0066a4f842591 (diff) | |
download | linux-cdfc7f888c2a355b01308e97c6df108f1c2b64e8.tar.xz |
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/bpf/do_hbm_test.sh')
0 files changed, 0 insertions, 0 deletions