@cryptotaxi247 / netdata-1 / commits / c8b513a04

Fix chart config overflow (#11645)

Stelios Fragkakis committed Oct 11, 2021 at 21:24 UTC c8b513a0459150a3583e3516af74c3040b3cc12d
1 file changed +2 -2
database/rrdset.c
+2 -2
@@ -699,11 +699,11 @@ RRDSET *rrdset_create_custom(
699 // ------------------------------------------------------------------------
700 // compose the config_section for this chart
701
702 - char config_section[RRD_ID_LENGTH_MAX + 1];
702 + char config_section[RRD_ID_LENGTH_MAX + GUID_LEN + 2];
703 if(host == localhost)
704 strcpy(config_section, fullid);
705 else
706 - snprintfz(config_section, RRD_ID_LENGTH_MAX, "%s/%s", host->machine_guid, fullid);
706 + snprintfz(config_section, RRD_ID_LENGTH_MAX + GUID_LEN + 1, "%s/%s", host->machine_guid, fullid);
707
708 // ------------------------------------------------------------------------
709 // get the options from the config, we need to create it