diff options
| author | Andrii Nakryiko <[email protected]> | 2019-07-02 15:16:20 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2019-07-03 09:52:45 +0000 |
| commit | cdfc7f888c2a355b01308e97c6df108f1c2b64e8 (patch) | |
| tree | e5af226c6107e531e09f61aad19520ec392cf483 /tools/lib/bpf/str_error.c | |
| parent | bpf: fix precision tracking (diff) | |
| download | kernel-cdfc7f888c2a355b01308e97c6df108f1c2b64e8.tar.gz kernel-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 <[email protected]>
Cc: Magnus Karlsson <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Acked-by: Magnus Karlsson <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/lib/bpf/str_error.c')
0 files changed, 0 insertions, 0 deletions
