Use the correct length (reported by Quanhong Wang).
authorBen Laurie <ben@openssl.org>
Tue, 3 Mar 2009 15:06:49 +0000 (15:06 +0000)
committerBen Laurie <ben@openssl.org>
Tue, 3 Mar 2009 15:06:49 +0000 (15:06 +0000)
crypto/evp/evp_test.c

index bb6f02c2e9f9a208cb39d24e337af3158170de68..436be20bf10a9edfecea231fd5336653e0173dfb 100644 (file)
@@ -220,18 +220,18 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
            test1_exit(7);
            }
 
-       if(outl+outl2 != cn)
+       if(outl+outl2 != pn)
            {
            fprintf(stderr,"Plaintext length mismatch got %d expected %d\n",
-                   outl+outl2,cn);
+                   outl+outl2,pn);
            test1_exit(8);
            }
 
-       if(memcmp(out,plaintext,cn))
+       if(memcmp(out,plaintext,pn))
            {
            fprintf(stderr,"Plaintext mismatch\n");
-           hexdump(stderr,"Got",out,cn);
-           hexdump(stderr,"Expected",plaintext,cn);
+           hexdump(stderr,"Got",out,pn);
+           hexdump(stderr,"Expected",plaintext,pn);
            test1_exit(9);
            }
        }