X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdaemon%2Fcommon.c;h=b5a1c980f549e517052a345e38dc3f88ea4cac20;hp=1775573a908376bc0fa07cd51b5cf4679d4ec58d;hb=711f5b6c86f51061c21bedcaa46214a01de0125c;hpb=e19d1f0affb0b68e11c9ed3448b3d5a663bb0049 diff --git a/src/daemon/common.c b/src/daemon/common.c index 1775573a..b5a1c980 100644 --- a/src/daemon/common.c +++ b/src/daemon/common.c @@ -339,6 +339,9 @@ int strjoin(char *buffer, size_t buffer_size, char **fields, size_t fields_num, buffer_req += sep_len; buffer_req += field_len; + if (buffer_size == 0) + continue; + if ((i != 0) && (sep_len > 0)) { if (sep_len >= avail) { /* prevent subsequent iterations from writing to the