From: Richard Levitte Date: Mon, 20 Jun 2005 22:11:14 +0000 (+0000) Subject: Do no try to pretend we're at the end of anything unless we're at the end X-Git-Tag: OpenSSL_0_9_8k^2~1998 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0fc6b2c9e28fb573b670eb205e2ddda74387b5aa;p=oweals%2Fopenssl.git Do no try to pretend we're at the end of anything unless we're at the end of a 4-character block. --- diff --git a/crypto/evp/encode.c b/crypto/evp/encode.c index 2d738f4b01..5921f0d710 100644 --- a/crypto/evp/encode.c +++ b/crypto/evp/encode.c @@ -313,7 +313,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, /* There will never be more than two '=' */ } - if ((v == B64_EOF) || (n >= 64)) + if ((v == B64_EOF && (n&3) == 0) || (n >= 64)) { /* This is needed to work correctly on 64 byte input * lines. We process the line and then need to