From 676f2f4c0b217a4729bdb14e8db1ddeb5a46aab7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 28 Nov 2008 20:51:28 +0800 Subject: [PATCH] --- yaml --- r: 120620 b: refs/heads/master c: b812eb0076235743872b5c9d18714d2324cc668d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/crypto/testmgr.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 41bc5686f639..fb119f5970b0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dad3df2044b78ba68a92bf78e38a408bab80ff61 +refs/heads/master: b812eb0076235743872b5c9d18714d2324cc668d diff --git a/trunk/crypto/testmgr.c b/trunk/crypto/testmgr.c index 67ff4aaa3c9c..a75f11ffb957 100644 --- a/trunk/crypto/testmgr.c +++ b/trunk/crypto/testmgr.c @@ -843,6 +843,14 @@ static int test_comp(struct crypto_comp *tfm, struct comp_testvec *ctemplate, 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)) { printk(KERN_ERR "alg: comp: Compression test %d " "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; } + 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)) { printk(KERN_ERR "alg: comp: Decompression test %d " "failed for %s\n", i + 1, algo);