From: Eric Young Date: Wed, 2 Apr 2014 18:50:33 +0000 (+0100) Subject: Fix base64 decoding bug. X-Git-Tag: OpenSSL_0_9_8za~38 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ad5c5e4f9ea8ad948a391ae39b59d40138895c0;p=oweals%2Fopenssl.git Fix base64 decoding bug. A short PEM encoded sequence if passed to the BIO, and the file had 2 \n following would fail. PR#3289 (cherry picked from commit 10378fb5f4c67270b800e8f7c600cd0548874811) --- diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c index 72a2a67277..ac6d441aad 100644 --- a/crypto/evp/bio_b64.c +++ b/crypto/evp/bio_b64.c @@ -264,7 +264,7 @@ static int b64_read(BIO *b, char *out, int outl) } /* we fell off the end without starting */ - if (j == i) + if ((j == i) && (num == 0)) { /* Is this is one long chunk?, if so, keep on * reading until a new line. */