projects
/
am-utils-6.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f1122a
)
Don't call xstrlcpy() to truncate a string. It causes spurious xstrlcpy()
author
Christos Zoulas
<christos@zoulas.com>
Sun, 11 Mar 2007 19:59:20 +0000
(19:59 +0000)
committer
Christos Zoulas
<christos@zoulas.com>
Sun, 11 Mar 2007 19:59:20 +0000
(19:59 +0000)
syslog() errors. Use memcpy() and explicitly terminate the string.
amd/opts.c
patch
|
blob
|
history
diff --git
a/amd/opts.c
b/amd/opts.c
index 039d3c3a7dc44d87e0a93aae2ec99238d8f7386c..fc6a09ba5b432d65932e60babdf5250237b9cf0b 100644
(file)
--- a/
amd/opts.c
+++ b/
amd/opts.c
@@
-1238,8
+1238,9
@@
expand_op(char *opt, int sel_p)
}
if (BUFSPACE(ep, vlen+1)) {
-
xstrl
cpy(ep, vptr, vlen+1);
+
mem
cpy(ep, vptr, vlen+1);
ep += vlen;
+ *ep = '\0';
} else {
plog(XLOG_ERROR, EXPAND_ERROR, opt);
goto out;