summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libfetch/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index 8d2f971..1d723d1 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -566,7 +566,7 @@ _http_base64(const char *src)
int t, r;
l = strlen(src);
- if ((str = malloc(((l + 2) / 3) * 4)) == NULL)
+ if ((str = malloc(((l + 2) / 3) * 4 + 1)) == NULL)
return (NULL);
dst = str;
r = 0;
OpenPOWER on IntegriCloud