From: Christos Zoulas Date: Sun, 11 Mar 2007 19:59:20 +0000 (+0000) Subject: Don't call xstrlcpy() to truncate a string. It causes spurious xstrlcpy() X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=b1878e6ff54af8034d68849300c1c030bf251de6;p=am-utils-6.1.git Don't call xstrlcpy() to truncate a string. It causes spurious xstrlcpy() syslog() errors. Use memcpy() and explicitly terminate the string. --- diff --git a/amd/opts.c b/amd/opts.c index 039d3c3..fc6a09b 100644 --- a/amd/opts.c +++ b/amd/opts.c @@ -1238,8 +1238,9 @@ expand_op(char *opt, int sel_p) } if (BUFSPACE(ep, vlen+1)) { - xstrlcpy(ep, vptr, vlen+1); + memcpy(ep, vptr, vlen+1); ep += vlen; + *ep = '\0'; } else { plog(XLOG_ERROR, EXPAND_ERROR, opt); goto out;