summaryrefslogtreecommitdiff
path: root/bin/csh/lex.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-04-07 22:46:00 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-04-07 22:46:00 +0000
commit3a40469a20e3f154926d95b57486d743b340aecb (patch)
tree3bc2a4a50120fe9f87c8717938a837d813375eaf /bin/csh/lex.c
parent4077e41fab3c84ef568dd58aea7aafb183b9e856 (diff)
Strlcpy improvements. ok deraadt@
Diffstat (limited to 'bin/csh/lex.c')
-rw-r--r--bin/csh/lex.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/csh/lex.c b/bin/csh/lex.c
index a87160b5f7a..0a2df425b0d 100644
--- a/bin/csh/lex.c
+++ b/bin/csh/lex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lex.c,v 1.8 2003/01/08 06:54:16 deraadt Exp $ */
+/* $OpenBSD: lex.c,v 1.9 2003/04/07 22:45:59 tedu Exp $ */
/* $NetBSD: lex.c,v 1.9 1995/09/27 00:38:46 jtc Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)lex.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: lex.c,v 1.8 2003/01/08 06:54:16 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: lex.c,v 1.9 2003/04/07 22:45:59 tedu Exp $";
#endif
#endif /* not lint */
@@ -973,7 +973,8 @@ subword(cp, type, adid)
return (STRNULL);
}
*wp = 0;
- (void) Strcat(wp, lhsb);
+ (void)Strlcat(wp, lhsb,
+ sizeof(wbuf)/sizeof(Char) - (wp - wbuf));
wp = Strend(wp);
continue;
}
@@ -984,7 +985,8 @@ subword(cp, type, adid)
return (STRNULL);
}
*wp = 0;
- (void) Strcat(wp, mp);
+ (void)Strlcat(wp, mp,
+ sizeof(wbuf)/sizeof(Char) - (wp - wbuf));
*adid = 1;
return (Strsave(wbuf));
}