diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-21 19:07:58 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-21 19:07:58 +0100 |
commit | 5da03da44b1c2d7693857bda1ce01c644c9aa5f4 (patch) | |
tree | b7e0e89af64bb498d70ab1629f1c9aeb351fc454 /src/3rdParty/http_tiny | |
parent | 36a9558737abb4fc6440903361a6c175a4140f35 (diff) | |
download | biruda-5da03da44b1c2d7693857bda1ce01c644c9aa5f4.tar.gz biruda-5da03da44b1c2d7693857bda1ce01c644c9aa5f4.tar.bz2 |
added completion for worker names
Diffstat (limited to 'src/3rdParty/http_tiny')
-rw-r--r-- | src/3rdParty/http_tiny/http_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdParty/http_tiny/http_lib.c b/src/3rdParty/http_tiny/http_lib.c index 916d5bc..a3ee603 100644 --- a/src/3rdParty/http_tiny/http_lib.c +++ b/src/3rdParty/http_tiny/http_lib.c @@ -345,11 +345,12 @@ http_retcode http_get(filename, pdata, plength, typebuf) return ERRNOLG; } if (plength) *plength=length; - if (!(*pdata=malloc(length))) { + if (!(*pdata=malloc(length+1))) { close(fd); return ERRMEM; } n=http_read_buffer(fd,*pdata,length); + *((*pdata)+length) = 0; close(fd); if (n!=length) ret=ERRRDDT; } else if (ret>=0) close(fd); |