summaryrefslogtreecommitdiffstats
path: root/nanohttp
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp')
-rw-r--r--nanohttp/nanohttp-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nanohttp/nanohttp-common.c b/nanohttp/nanohttp-common.c
index bb4cde9..e13276d 100644
--- a/nanohttp/nanohttp-common.c
+++ b/nanohttp/nanohttp-common.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-common.c,v 1.2 2003/12/16 13:16:13 snowdrop Exp $
+ * $Id: nanohttp-common.c,v 1.3 2003/12/17 13:48:37 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -255,7 +255,7 @@ hurl_t* hurl_new(const char* urlstr)
url->protocol[iprotocol] = '\0';
size = ihost - iprotocol - 3;
- url->host = (char*)malloc(sizeof(char)*size);
+ url->host = (char*)malloc(sizeof(char)*size + 1);
strncpy(url->host, &urlstr[iprotocol+3], size);
url->host[size] = '\0';