summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/restore.c b/src/restore.c
index 5c6011f..d3828f9 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -1235,7 +1235,7 @@ static size_t _curl_header_callback(char* buffer, size_t size, size_t nitems, vo
key[i] = '\0';
i++;
while (i < len && buffer[i] == ' ' || buffer[i] == '\t') i++;
- val = malloc(len-i);
+ val = malloc(len-i+1);
strncpy(val, buffer+i, len-i);
val[len-i] = '\0';
break;