From: Florian Forster Date: Sun, 21 Dec 2008 02:00:51 +0000 (+0100) Subject: src/utils_subst.c: Print the warning of the subst_string function when appropriate. X-Git-Tag: collectd-4.6.0~119 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=52acedd71e96f61d312456396006eff23df8e60a;p=collectd.git src/utils_subst.c: Print the warning of the subst_string function when appropriate. A leftover from the previous setting, a hard-coded maximum, was forgotten. --- diff --git a/src/utils_subst.c b/src/utils_subst.c index 3c9fe5a2..640007c7 100644 --- a/src/utils_subst.c +++ b/src/utils_subst.c @@ -128,7 +128,7 @@ char *subst_string (char *buf, size_t buflen, const char *string, strncpy (buf, temp, buflen); } - if (i >= 100) + if (i >= buflen) { WARNING ("subst_string: Loop exited after %zu iterations: " "string = %s; needle = %s; replacement = %s;",