]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/sctp/auth.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[mv-sheeva.git] / net / sctp / auth.c
index 865e68fef21c326c631183c7c7d5ded4ad842647..bf812048cf6f7a244c547e0cd31a731351abfab3 100644 (file)
@@ -82,7 +82,7 @@ static struct sctp_auth_bytes *sctp_auth_create_key(__u32 key_len, gfp_t gfp)
        struct sctp_auth_bytes *key;
 
        /* Verify that we are not going to overflow INT_MAX */
-       if ((INT_MAX - key_len) < sizeof(struct sctp_auth_bytes))
+       if (key_len > (INT_MAX - sizeof(struct sctp_auth_bytes)))
                return NULL;
 
        /* Allocate the shared key */