mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Subtract padding from outlen in ct_base64_decode
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1548)
This commit is contained in:
parent
f7a39a5a3f
commit
70a06fc1a8
@ -45,6 +45,11 @@ static int ct_base64_decode(const char *in, unsigned char **out)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Subtract padding bytes from |outlen| */
|
||||
while (in[--inlen] == '=') {
|
||||
--outlen;
|
||||
}
|
||||
|
||||
*out = outbuf;
|
||||
return outlen;
|
||||
err:
|
||||
|
Loading…
Reference in New Issue
Block a user