projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add sstrncpy if count_parts>2 but no suffix
[collectd.git]
/
src
/
ceph.c
diff --git
a/src/ceph.c
b/src/ceph.c
index
421c7ef
..
523bc75
100644
(file)
--- a/
src/ceph.c
+++ b/
src/ceph.c
@@
-532,6
+532,8
@@
static int parse_keys(char *buffer, size_t buffer_size, const char *key_str) {
cut_suffix(tmp, tmp_size, key_str, ".sum");
} else if (has_suffix(key_str, ".avgtime")) {
cut_suffix(tmp, tmp_size, key_str, ".avgtime");
+ } else {
+ sstrncpy(tmp, key_str, sizeof(tmp));
}
} else {
sstrncpy(tmp, key_str, sizeof(tmp));