summaryrefslogtreecommitdiff
path: root/usr.bin/unifdef
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-02-17 05:16:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-02-17 05:16:10 +0000
commit39e183e1c5f4baea016c6718b614dcb91513bd7f (patch)
tree1348cf2b1ee8b11784515cec73e596f9527bca0a /usr.bin/unifdef
parent20385dd08f13862981299db9e3f611bdd27df7eb (diff)
Convert a strcpy() call to strlcpy(); ok millert@ sthen@
Diffstat (limited to 'usr.bin/unifdef')
-rw-r--r--usr.bin/unifdef/unifdef.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/unifdef/unifdef.c b/usr.bin/unifdef/unifdef.c
index 47a8d2a759d..89df19740aa 100644
--- a/usr.bin/unifdef/unifdef.c
+++ b/usr.bin/unifdef/unifdef.c
@@ -47,7 +47,7 @@
static const char copyright[] =
#include "version.h"
- "@(#) $Author: jmc $\n"
+ "@(#) $Author: miod $\n"
"@(#) $URL: http://dotat.at/prog/unifdef $\n"
;
@@ -838,7 +838,7 @@ parseline(void)
if (ferror(input))
err(2, "can't read %s", filename);
/* append the missing newline at eof */
- strcpy(tline + len, newline);
+ strlcpy(tline + len, newline, sizeof(tline) - len);
cp += strlen(newline);
linestate = LS_START;
} else {