Fix warning.
authorBen Laurie <ben@links.org>
Wed, 29 Jan 2014 16:57:32 +0000 (17:57 +0100)
committerBen Laurie <ben@links.org>
Thu, 13 Feb 2014 03:11:58 +0000 (03:11 +0000)
crypto/pem/pem_lib.c

index 5e41d85..2d328b4 100644 (file)
@@ -480,8 +480,9 @@ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
        EVP_CIPHER_CTX_cleanup(&ctx);
        OPENSSL_cleanse((char *)buf,sizeof(buf));
        OPENSSL_cleanse((char *)key,sizeof(key));
-       j+=i;
-       if (!o)
+       if (o)
+               j+=i;
+       else
                {
                PEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_DECRYPT);
                return(0);