From: Andrey Utkin Date: Fri, 18 Jul 2014 15:31:57 +0000 (+0300) Subject: net/rxrpc/ar-key.c: drop negativity check on unsigned value X-Git-Tag: v3.17-rc1~106^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa4eff44a65c91c9ad09e5695ba171a107e5c327;p=platform%2Fkernel%2Flinux-exynos.git net/rxrpc/ar-key.c: drop negativity check on unsigned value Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80611 Reported-by: David Binderman Signed-off-by: Andrey Utkin Signed-off-by: David S. Miller --- diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c index 0ad0807..eec998e 100644 --- a/net/rxrpc/ar-key.c +++ b/net/rxrpc/ar-key.c @@ -346,7 +346,7 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td, n_elem = ntohl(*xdr++); toklen -= 4; - if (n_elem < 0 || n_elem > max_n_elem) + if (n_elem > max_n_elem) return -EINVAL; *_n_elem = n_elem; if (n_elem > 0) {