Don't forget to allocate space for the terminating NUL when converting to
base 64. PR: misc/70022 Submitted by: Herve Masson <herve-bsdbt@mindstep.com> MFC after: 3 days
This commit is contained in:
parent
c6a109c230
commit
4fb65f044c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user