diff options
author | snowdrop | 2003-12-17 13:48:37 +0000 |
---|---|---|
committer | snowdrop | 2003-12-17 13:48:37 +0000 |
commit | 20089651b2aeb13a7ad374d19b2fc3b26b29455a (patch) | |
tree | 96d43198f418ac09db0188129b5a256b4a4a2f67 /nanohttp | |
parent | 9b582c4a2767fdadbf5e8e9ea7ebeb269f623f22 (diff) | |
download | csoap-20089651b2aeb13a7ad374d19b2fc3b26b29455a.tar.gz csoap-20089651b2aeb13a7ad374d19b2fc3b26b29455a.tar.bz2 |
bugfix in hurl_new()
Diffstat (limited to 'nanohttp')
-rw-r--r-- | nanohttp/nanohttp-common.c | 4 |
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'; |