X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fnginx.c;h=15e56fbc327f4c1cf6fcd2433abc73611e54478d;hp=7bb307a3985bfe2a27dbf1fb4f9a9811a5ffd955;hb=abaa1c8a24e8eff5632dd6052b1da5f6535caf19;hpb=47a8c3f0893a4ad8ef8f690ae0bd496ef55dcdcd diff --git a/src/nginx.c b/src/nginx.c index 7bb307a3..15e56fbc 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -122,7 +122,7 @@ static int init(void) { curl_easy_setopt(curl, CURLOPT_PASSWORD, (pass == NULL) ? "" : pass); #else static char credentials[1024]; - int status = snprintf(credentials, sizeof(credentials), "%s:%s", user, + int status = ssnprintf(credentials, sizeof(credentials), "%s:%s", user, pass == NULL ? "" : pass); if ((status < 0) || ((size_t)status >= sizeof(credentials))) { ERROR("nginx plugin: Credentials would have been truncated.");