diff options
Diffstat (limited to 'src/regress/lib/libc/regex/split.c')
-rw-r--r-- | src/regress/lib/libc/regex/split.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/regress/lib/libc/regex/split.c b/src/regress/lib/libc/regex/split.c index 1e17a55b89..f0f72c8b66 100644 --- a/src/regress/lib/libc/regex/split.c +++ b/src/regress/lib/libc/regex/split.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: split.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */ | 1 | /* $OpenBSD: split.c,v 1.4 2004/02/28 08:06:47 deraadt Exp $ */ |
2 | /* $NetBSD: split.c,v 1.2 1995/04/20 22:39:57 cgd Exp $ */ | 2 | /* $NetBSD: split.c,v 1.2 1995/04/20 22:39:57 cgd Exp $ */ |
3 | 3 | ||
4 | #include <stdio.h> | 4 | #include <stdio.h> |
@@ -160,11 +160,11 @@ char *argv[]; | |||
160 | 160 | ||
161 | if (argc > 4) | 161 | if (argc > 4) |
162 | for (n = atoi(argv[3]); n > 0; n--) { | 162 | for (n = atoi(argv[3]); n > 0; n--) { |
163 | (void) strcpy(buf, argv[1]); | 163 | (void) strlcpy(buf, argv[1], sizeof buf); |
164 | } | 164 | } |
165 | else if (argc > 3) | 165 | else if (argc > 3) |
166 | for (n = atoi(argv[3]); n > 0; n--) { | 166 | for (n = atoi(argv[3]); n > 0; n--) { |
167 | (void) strcpy(buf, argv[1]); | 167 | (void) strlcpy(buf, argv[1], sizeof buf); |
168 | (void) split(buf, fields, MNF, argv[2]); | 168 | (void) split(buf, fields, MNF, argv[2]); |
169 | } | 169 | } |
170 | else if (argc > 2) | 170 | else if (argc > 2) |
@@ -286,7 +286,7 @@ regress() | |||
286 | register char *f; | 286 | register char *f; |
287 | 287 | ||
288 | for (n = 0; tests[n].str != NULL; n++) { | 288 | for (n = 0; tests[n].str != NULL; n++) { |
289 | (void) strcpy(buf, tests[n].str); | 289 | (void) strlcpy(buf, tests[n].str, sizeof buf); |
290 | fields[RNF] = NULL; | 290 | fields[RNF] = NULL; |
291 | nf = split(buf, fields, RNF, tests[n].seps); | 291 | nf = split(buf, fields, RNF, tests[n].seps); |
292 | printit = 0; | 292 | printit = 0; |