summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2003-04-08 16:24:47 +0000
committerhenning <henning@openbsd.org>2003-04-08 16:24:47 +0000
commitf2d2f451d670fd58d17f6d605ac08b07bde4b973 (patch)
tree3f37c4d9fbc2934be50fc80a0c6e52556d463fd3
parenteasy strcpy elimination (diff)
downloadwireguard-openbsd-f2d2f451d670fd58d17f6d605ac08b07bde4b973.tar.xz
wireguard-openbsd-f2d2f451d670fd58d17f6d605ac08b07bde4b973.zip
more string shitz
-rw-r--r--usr.sbin/httpd/src/main/util.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/usr.sbin/httpd/src/main/util.c b/usr.sbin/httpd/src/main/util.c
index 7428a347a16..18f3b7dc2f6 100644
--- a/usr.sbin/httpd/src/main/util.c
+++ b/usr.sbin/httpd/src/main/util.c
@@ -1819,7 +1819,7 @@ char *strdup(const char *str)
fprintf(stderr, "Ouch! Out of memory in our strdup()!\n");
return NULL;
}
- sdup = strcpy(sdup, str);
+ sdup = strlcpy(sdup, str, strlen(str) + 1);
return sdup;
}
@@ -2238,34 +2238,6 @@ API_EXPORT(char *) ap_caret_escape_args(pool *p, const char *str)
}
#endif
-#ifdef OS2
-void os2pathname(char *path)
-{
- char newpath[MAX_STRING_LEN];
- int loop;
- int offset;
-
- offset = 0;
- for (loop = 0; loop < (strlen(path) + 1) && loop < sizeof(newpath) - 1; loop++) {
- if (path[loop] == '/') {
- newpath[offset] = '\\';
- /*
- offset = offset + 1;
- newpath[offset] = '\\';
- */
- }
- else
- newpath[offset] = path[loop];
- offset = offset + 1;
- };
- /* Debugging code */
- /* fprintf(stderr, "%s \n", newpath); */
-
- strcpy(path, newpath);
-};
-#endif
-
-
#ifdef NEED_STRERROR
char *
strerror(int err)