summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-04-08 17:40:47 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-04-08 17:40:47 +0000
commit1189e6222981c8389612570cf08db7b5d49056d4 (patch)
treeebd59c9c675d5ddcbc05c70cdf666dbe777309e9
parent998c7a2d23a8a61afe7388a1719df36e2ef844b7 (diff)
string stuff; ok pval@
-rw-r--r--usr.sbin/httpd/src/modules/standard/mod_mime.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/httpd/src/modules/standard/mod_mime.c b/usr.sbin/httpd/src/modules/standard/mod_mime.c
index 3a6b487be61..ace2c095529 100644
--- a/usr.sbin/httpd/src/modules/standard/mod_mime.c
+++ b/usr.sbin/httpd/src/modules/standard/mod_mime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mod_mime.c,v 1.10 2002/08/15 16:06:11 henning Exp $ */
+/* $OpenBSD: mod_mime.c,v 1.11 2003/04/08 17:40:46 henning Exp $ */
/* ====================================================================
* The Apache Software License, Version 1.1
@@ -716,11 +716,12 @@ static int find_ct(request_rec *r)
if (r->content_type) {
content_type *ctp;
char *ct;
+ size_t ctlen;
int override = 0;
- ct = (char *) ap_palloc(r->pool,
- sizeof(char) * (strlen(r->content_type) + 1));
- strcpy(ct, r->content_type);
+ ctlen = sizeof(char) * (strlen(r->content_type) + 1);
+ ct = (char *) ap_palloc(r->pool, ctlen);
+ strlcpy(ct, r->content_type, ctlen);
if ((ctp = analyze_ct(r->pool, ct))) {
param *pp = ctp->param;