Fix base64 decoding bug.
[openssl.git] / crypto / evp / bio_b64.c
index 72a2a67277a32e9b470fe24a8eec7b68fb1d5850..ac6d441aadb9f623634b90d9bd51748c8e3071c2 100644 (file)
@@ -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. */