Initialize num properly.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 6 May 2014 13:07:37 +0000 (14:07 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 May 2014 13:09:14 +0000 (14:09 +0100)
PR#3289
PR#3345
(cherry picked from commit 3ba1e406c2309adb427ced9815ebf05f5b58d155)

crypto/evp/bio_b64.c

index ac6d441aadb9f623634b90d9bd51748c8e3071c2..16863fe23f0e3bfc4cb82be31c01e2cd9b8f2518 100644 (file)
@@ -226,6 +226,7 @@ static int b64_read(BIO *b, char *out, int outl)
                else if (ctx->start)
                        {
                        q=p=(unsigned char *)ctx->tmp;
+                       num = 0;
                        for (j=0; j<i; j++)
                                {
                                if (*(q++) != '\n') continue;