summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2021-10-11 21:24:58 +0300
committerGitHub <noreply@github.com>2021-10-11 21:24:58 +0300
commitc8b513a0459150a3583e3516af74c3040b3cc12d (patch)
tree53cb5eb3e892046da7ec54e1abad79a91cf064b9 /database
parent2e6107b2be44448e490334e0db44524d39a8304c (diff)
Fix chart config overflow (#11645)
Diffstat (limited to 'database')
-rw-r--r--database/rrdset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/database/rrdset.c b/database/rrdset.c
index 95e7eb0c2b..e4701e3b9e 100644
--- a/database/rrdset.c
+++ b/database/rrdset.c
@@ -699,11 +699,11 @@ RRDSET *rrdset_create_custom(
// ------------------------------------------------------------------------
// compose the config_section for this chart
- char config_section[RRD_ID_LENGTH_MAX + 1];
+ char config_section[RRD_ID_LENGTH_MAX + GUID_LEN + 2];
if(host == localhost)
strcpy(config_section, fullid);
else
- snprintfz(config_section, RRD_ID_LENGTH_MAX, "%s/%s", host->machine_guid, fullid);
+ snprintfz(config_section, RRD_ID_LENGTH_MAX + GUID_LEN + 1, "%s/%s", host->machine_guid, fullid);
// ------------------------------------------------------------------------
// get the options from the config, we need to create it