projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afead08
)
Add sstrncpy if count_parts>2 but no suffix
author
Aleksei Zakharov
<zakharov.a.g@yandex.ru>
Thu, 12 Oct 2017 10:43:54 +0000
(10:43 +0000)
committer
Aleksei Zakharov
<zakharov.a.g@yandex.ru>
Thu, 12 Oct 2017 10:43:54 +0000
(10:43 +0000)
src/ceph.c
patch
|
blob
|
history
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));