diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2021-03-03 10:28:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 10:28:59 +0000 |
commit | c629e561eb54cc4bfae0b508cc76f278790e3ad6 (patch) | |
tree | 1dd25be6755b7b0fd986b892373771d2227dc01f /libnetdata | |
parent | 43ba84b4ef3f1a602e79fbcd9d31748d9868a530 (diff) |
update_kernel_version
Fix overflow on Centos and probably Ubuntu
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/ebpf/ebpf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libnetdata/ebpf/ebpf.c b/libnetdata/ebpf/ebpf.c index 4af5182249..63aa1f2503 100644 --- a/libnetdata/ebpf/ebpf.c +++ b/libnetdata/ebpf/ebpf.c @@ -97,7 +97,7 @@ int get_kernel_version(char *out, int size) return -1; move = patch; - while (*version && *version != '\n') + while (*version && *version != '\n' && *version != '-') *move++ = *version++; *move = '\0'; |