diff options
author | Pan Bian <bianpan2016@163.com> | 2016-12-01 10:04:43 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-12-01 21:06:43 +0800 |
commit | 41ec79fb6d327cd4e082033ff3802ab23ba7d880 (patch) | |
tree | f9281caca4515ad008eb8c38337abf98a7333f2c /crypto/lrw.c | |
parent | c61a09fe91dd13861ed9987486728bde7013e764 (diff) | |
download | linux-crypto-41ec79fb6d327cd4e082033ff3802ab23ba7d880.tar.gz linux-crypto-41ec79fb6d327cd4e082033ff3802ab23ba7d880.zip |
crypto: algif_skcipher - set error code when kcalloc fails
Fix bug https://bugzilla.kernel.org/show_bug.cgi?id=188521. In function
skcipher_recvmsg_async(), variable err takes the return value, and its
value should be negative on failures. Because variable err may be
reassigned and checked before calling kcalloc(), its value may be 0
(indicates no error) even if kcalloc() fails. This patch fixes the bug
by explicitly assigning -ENOMEM to err when kcalloc() returns a NULL
pointer.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions