Commit:     12dc5e62b4f93f1d399fd81e35be3f9ea0027712
Parent:     c2c61f513db395ddd8d67690bf3301ebe1e8155a
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 10 10:55:21 2007 +0800
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Fri Jan 11 08:16:38 2008 +1100

    [CRYPTO] authenc: Use RTA_OK to check length
    This patch changes setkey to use RTA_OK to check the validity of the
    setkey request.
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
 crypto/authenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/crypto/authenc.c b/crypto/authenc.c
index 80d9d0b..aa442de 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -44,7 +44,7 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, 
const u8 *key,
        struct crypto_authenc_key_param *param;
        int err = -EINVAL;
-       if (keylen < sizeof(*rta))
+       if (!RTA_OK(rta, keylen))
                goto badkey;
        if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM)
                goto badkey;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to