mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
xt_pknock: avoid crash when hash TFM could not be allocated
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
HEAD
|
HEAD
|
||||||
====
|
====
|
||||||
|
Fixes:
|
||||||
|
- xt_pknock: avoid crash when hash TFM could not be allocated
|
||||||
|
|
||||||
|
|
||||||
v1.33 (2011-02-02)
|
v1.33 (2011-02-02)
|
||||||
|
@@ -1164,11 +1164,10 @@ static int __init xt_pknock_mt_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
crypto.tfm = crypto_alloc_hash(crypto.algo, 0, CRYPTO_ALG_ASYNC);
|
crypto.tfm = crypto_alloc_hash(crypto.algo, 0, CRYPTO_ALG_ASYNC);
|
||||||
|
if (IS_ERR(crypto.tfm)) {
|
||||||
if (crypto.tfm == NULL) {
|
|
||||||
printk(KERN_ERR PKNOCK "failed to load transform for %s\n",
|
printk(KERN_ERR PKNOCK "failed to load transform for %s\n",
|
||||||
crypto.algo);
|
crypto.algo);
|
||||||
return -ENXIO;
|
return PTR_ERR(crypto.tfm);
|
||||||
}
|
}
|
||||||
|
|
||||||
crypto.size = crypto_hash_digestsize(crypto.tfm);
|
crypto.size = crypto_hash_digestsize(crypto.tfm);
|
||||||
|
Reference in New Issue
Block a user