projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: aead - Do not allow authsize=0 if auth. alg has digestsize>0
[linux-2.6-microblaze.git]
/
crypto
/
aead.c
diff --git
a/crypto/aead.c
b/crypto/aead.c
index
fbf0ec9
..
ce03558
100644
(file)
--- a/
crypto/aead.c
+++ b/
crypto/aead.c
@@
-70,7
+70,8
@@
int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize)
{
int err;
- if (authsize > crypto_aead_maxauthsize(tfm))
+ if ((!authsize && crypto_aead_maxauthsize(tfm)) ||
+ authsize > crypto_aead_maxauthsize(tfm))
return -EINVAL;
if (crypto_aead_alg(tfm)->setauthsize) {