summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <>2004-02-28 08:06:47 +0000
committerderaadt <>2004-02-28 08:06:47 +0000
commita16a24f1c5770e130e61c36fa343d0dcd5707972 (patch)
tree6ce1c80791fc75f96129b66d81f38afbd495debd
parent75c3b2d2e6ae84ad1232686b18e5e88996c2cbbe (diff)
downloadopenbsd-a16a24f1c5770e130e61c36fa343d0dcd5707972.tar.gz
openbsd-a16a24f1c5770e130e61c36fa343d0dcd5707972.tar.bz2
openbsd-a16a24f1c5770e130e61c36fa343d0dcd5707972.zip
kill bad functions; some sort of ok from marc who is trying to confuse me
-rw-r--r--src/regress/lib/libc/regex/main.c6
-rw-r--r--src/regress/lib/libc/regex/split.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/regress/lib/libc/regex/main.c b/src/regress/lib/libc/regex/main.c
index 02f4bd7cf2..fd092905fa 100644
--- a/src/regress/lib/libc/regex/main.c
+++ b/src/regress/lib/libc/regex/main.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: main.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */ 1/* $OpenBSD: main.c,v 1.5 2004/02/28 08:06:46 deraadt Exp $ */
2/* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ 2/* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */
3 3
4#include <stdio.h> 4#include <stdio.h>
@@ -228,7 +228,7 @@ int opts; /* may not match f1 */
228 char f0copy[1000]; 228 char f0copy[1000];
229 char f2copy[1000]; 229 char f2copy[1000];
230 230
231 strcpy(f0copy, f0); 231 strlcpy(f0copy, f0, sizeof f0copy);
232 re.re_endp = (opts&REG_PEND) ? f0copy + strlen(f0copy) : NULL; 232 re.re_endp = (opts&REG_PEND) ? f0copy + strlen(f0copy) : NULL;
233 fixstr(f0copy); 233 fixstr(f0copy);
234 err = regcomp(&re, f0copy, opts); 234 err = regcomp(&re, f0copy, opts);
@@ -252,7 +252,7 @@ int opts; /* may not match f1 */
252 return; 252 return;
253 } 253 }
254 254
255 strcpy(f2copy, f2); 255 strlcpy(f2copy, f2, sizeof f2copy);
256 fixstr(f2copy); 256 fixstr(f2copy);
257 257
258 if (options('e', f1)&REG_STARTEND) { 258 if (options('e', f1)&REG_STARTEND) {
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;