|
@@ -843,6 +843,14 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate,
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (dlen != ctemplate[i].outlen) {
|
|
|
|
+ printk(KERN_ERR "alg: comp: Compression test %d "
|
|
|
|
+ "failed for %s: output len = %d\n", i + 1, algo,
|
|
|
|
+ dlen);
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (memcmp(result, ctemplate[i].output, dlen)) {
|
|
if (memcmp(result, ctemplate[i].output, dlen)) {
|
|
printk(KERN_ERR "alg: comp: Compression test %d "
|
|
printk(KERN_ERR "alg: comp: Compression test %d "
|
|
"failed for %s\n", i + 1, algo);
|
|
"failed for %s\n", i + 1, algo);
|
|
@@ -867,6 +875,14 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate,
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (dlen != dtemplate[i].outlen) {
|
|
|
|
+ printk(KERN_ERR "alg: comp: Decompression test %d "
|
|
|
|
+ "failed for %s: output len = %d\n", i + 1, algo,
|
|
|
|
+ dlen);
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (memcmp(result, dtemplate[i].output, dlen)) {
|
|
if (memcmp(result, dtemplate[i].output, dlen)) {
|
|
printk(KERN_ERR "alg: comp: Decompression test %d "
|
|
printk(KERN_ERR "alg: comp: Decompression test %d "
|
|
"failed for %s\n", i + 1, algo);
|
|
"failed for %s\n", i + 1, algo);
|