summaryrefslogtreecommitdiffstats
path: root/crypto/evp/encode.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-08-13 19:42:33 +0000
committerUlf Möller <ulf@openssl.org>1999-08-13 19:42:33 +0000
commit2b7af70139076691e622dd64829adcae74d181ad (patch)
tree4e528f3516fb01c686bea907df5501c06ea529d5 /crypto/evp/encode.c
parent1bf0b46b13f622c9e387af18cf46c3a0c772172f (diff)
Fix faulty base64 decoding of data that was 46 or 47 bytes long.
Submitted by: Ivan Nejgebauer <ian@uns.ns.ac.yu>
Diffstat (limited to 'crypto/evp/encode.c')
-rw-r--r--crypto/evp/encode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c
index 0152624a76..110435d5df 100644
--- a/crypto/evp/encode.c
+++ b/crypto/evp/encode.c
@@ -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)
{