aboutsummaryrefslogtreecommitdiff
path: root/src/Server.c
diff options
context:
space:
mode:
authorgoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2000-09-16 11:24:46 +0000
committergoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2000-09-16 11:24:46 +0000
commit5943c47cf203a789b708919e439ee6d610e40064 (patch)
tree81ab0854dc43dc09614a766d8fd2681cd75f9a0a /src/Server.c
parentaf7693f8fa6cdd68b97028beb1beed9448446d50 (diff)
Some more stupid malloc errors.
Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@23 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/Server.c')
-rw-r--r--src/Server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Server.c b/src/Server.c
index b401ed3..9bf56f7 100644
--- a/src/Server.c
+++ b/src/Server.c
@@ -275,7 +275,7 @@ static httpPage *FindPage(char *path, char **residual)
#ifdef HTTP_DEBUG
printf("Looking for '%sindex.html'\n", path);
#endif
- temp = (char *)malloc(sizeof(path)+11);
+ temp = (char *)malloc(strlen(path)+11);
sprintf(temp,"%sindex.html", path);
@@ -294,7 +294,7 @@ static httpPage *FindPage(char *path, char **residual)
#ifdef HTTP_DEBUG
printf("Looking for '%s/index.html'\n", path);
#endif
- temp = (char *)malloc(sizeof(path)+12);
+ temp = (char *)malloc(strlen(path)+12);
sprintf(temp,"%s/index.html", path);