mirror of
https://github.com/openssl/openssl.git
synced 2024-12-19 06:53:49 +08:00
Fix faulty base64 decoding of data that was 46 or 47 bytes long.
Submitted by: Ivan Nejgebauer <ian@uns.ns.ac.yu>
This commit is contained in:
parent
1bf0b46b13
commit
2b7af70139
@ -294,12 +294,12 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
||||
if (((i+1) == inl) && (((n&3) == 0) || eof))
|
||||
v=B64_EOF;
|
||||
|
||||
if ((v == B64_EOF) || (n >= 64))
|
||||
if ((v == B64_EOF) || (n >= 68))
|
||||
{
|
||||
/* This is needed to work correctly on 64 byte input
|
||||
* lines. We process the line and then need to
|
||||
* accept the '\n' */
|
||||
if ((v != B64_EOF) && (n >= 64)) exp_nl=1;
|
||||
if ((v != B64_EOF) && (n >= 68)) exp_nl=1;
|
||||
tmp2=v;
|
||||
if (n > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user