提交 2121f15d 编写于 作者: B Ben Laurie

Use the right length (reported by Quanhong Wang).

上级 b2cf7c64
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册