summaryrefslogtreecommitdiff
path: root/src/3rdParty/http_tiny
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-11-21 19:07:58 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2014-11-21 19:07:58 +0100
commit5da03da44b1c2d7693857bda1ce01c644c9aa5f4 (patch)
treeb7e0e89af64bb498d70ab1629f1c9aeb351fc454 /src/3rdParty/http_tiny
parent36a9558737abb4fc6440903361a6c175a4140f35 (diff)
downloadbiruda-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.c3
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);