X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fperl.c;h=f2cb7b6687a40ced37e5f05572cdf07c563e5b1f;hb=83037eab40e9bba3803534d0b2b93c1c282dd564;hp=1ad72487cc329c487eef65cc65837edee74bfc31;hpb=14b7c735bf93b5a6260a0e064bccc28dc7581c7f;p=collectd.git diff --git a/src/perl.c b/src/perl.c index 1ad72487..f2cb7b66 100644 --- a/src/perl.c +++ b/src/perl.c @@ -333,7 +333,7 @@ static char *get_module_name (char *buf, size_t buf_len, const char *module) { status = snprintf (buf, buf_len, "%s::%s", base_name, module); if ((status < 0) || (status >= buf_len)) return (NULL); - buf[buf_len] = '\0'; + buf[buf_len - 1] = '\0'; return (buf); } /* char *get_module_name */