diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-06 18:42:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-06 18:42:58 +0000 |
commit | b25601fdead00d8212c3f004ab0bdefa099b837f (patch) | |
tree | 1ddc25d018df9cdfdf22487afc1955a9cbdaf2d3 /usr.bin | |
parent | f9e1d22e4da9317af55945e22dc35e3820098360 (diff) |
very simple strlcat calls
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/less/filename.c | 6 | ||||
-rw-r--r-- | usr.bin/less/regexp.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/less/filename.c b/usr.bin/less/filename.c index 5c7b8ecba3e..cd467b556bd 100644 --- a/usr.bin/less/filename.c +++ b/usr.bin/less/filename.c @@ -1,4 +1,4 @@ -/* $OpenBSD: filename.c,v 1.5 2003/04/05 01:03:35 deraadt Exp $ */ +/* $OpenBSD: filename.c,v 1.6 2003/04/06 18:42:57 deraadt Exp $ */ /* * Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman @@ -405,8 +405,8 @@ glob(filename) gfilename = (char *) ecalloc(length, sizeof(char)); for (cnt = 0; list[cnt] != NULL; cnt++) { - strcat(gfilename, list[cnt]); - strcat(gfilename, " "); + strcat(gfilename, list[cnt], length); + strcat(gfilename, " ", length); } _fnexplodefree(list); } diff --git a/usr.bin/less/regexp.c b/usr.bin/less/regexp.c index c9724f4ce71..3313855de45 100644 --- a/usr.bin/less/regexp.c +++ b/usr.bin/less/regexp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: regexp.c,v 1.4 2003/04/05 01:03:35 deraadt Exp $ */ +/* $OpenBSD: regexp.c,v 1.5 2003/04/06 18:42:57 deraadt Exp $ */ /* * regcomp and regexec -- regsub and regerror are elsewhere @@ -1192,7 +1192,7 @@ char *op; break; } if (p != NULL) - (void) strcat(buf, p); + (void) strlcat(buf, p, sizeof buf); return(buf); } #endif |