diff options
author | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-16 11:24:46 +0000 |
---|---|---|
committer | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-16 11:24:46 +0000 |
commit | 5943c47cf203a789b708919e439ee6d610e40064 (patch) | |
tree | 81ab0854dc43dc09614a766d8fd2681cd75f9a0a | |
parent | af7693f8fa6cdd68b97028beb1beed9448446d50 (diff) |
Some more stupid malloc errors.
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@23 1faa4e14-9dd3-4be0-9f0e-ffe519881164
-rw-r--r-- | src/Server.c | 4 |
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); |