Commit cd3a3a2d authored by Deucе's avatar Deucе 👌🏾
Browse files

Fix b64 decode buf length calculation

Previously, b64_decode was being asked to decode past the end of
the application string.
parent 3e01fc3d
Pipeline #3490 passed with stage
in 5 minutes and 27 seconds
......@@ -2223,7 +2223,7 @@ static void apc_handler(char *strbuf, size_t slen, void *apcd)
buf = malloc(sz);
if (!buf)
return;
rc = b64_decode(buf, sz, p, slen);
rc = b64_decode(buf, sz, p, slen - (p - strbuf));
if (rc < 0) {
free(buf);
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment