diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-17 05:31:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-17 05:31:30 +0000 |
commit | e620d561ca6d36440b5d485f2ad3a462885928f1 (patch) | |
tree | 799b38b90935295033cc74d587d1c0f37cb05b68 /libexec/tradcpp/macro.c | |
parent | 2f7e5a567fc995841910806e3d4b9850328f726b (diff) |
eliminate strcpy & strcat, by using strlcpy, strlcat or snprintf where
suitable.
ok jsg
Diffstat (limited to 'libexec/tradcpp/macro.c')
-rw-r--r-- | libexec/tradcpp/macro.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/tradcpp/macro.c b/libexec/tradcpp/macro.c index 21059801333..8fe1e372aeb 100644 --- a/libexec/tradcpp/macro.c +++ b/libexec/tradcpp/macro.c @@ -779,10 +779,10 @@ expand_substitute(struct place *p, struct expstate *es) for (i=0; i<num; i++) { ei = expansionitemarray_get(&es->curmacro->expansion, i); if (ei->isstring) { - strcat(ret, ei->string); + strlcat(ret, ei->string, len+1); } else { arg = stringarray_get(&es->args, ei->param); - strcat(ret, arg); + strlcat(ret, arg, len+1); } } |