summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-07-15 23:24:03 +0100
committerNick White <hg@njw.me.uk>2011-07-15 23:24:03 +0100
commit9cc59faa6692be97c77e17fec161c678e14a6ad2 (patch)
treefff4d35666398c8f34f4be429419154f6c568e17
parent40199b38e08b550bdc27062c78e8cbe38a5e7c80 (diff)
Fix malloc bug
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 427833b..3f969a6 100644
--- a/util.c
+++ b/util.c
@@ -61,7 +61,7 @@ char *get(FILE *srv, char *host, char *path) {
p+=4;
i = l - (p - buf);
- c = malloc(i);
+ c = malloc(i+1);
memcpy(c, p, i);
free(buf);