[PATCH 2/5] net/rxrpc/ar-key.c: drop negativity check on unsigned value

Subsystems: networking [general], rxrpc sockets (af_rxrpc), the rest

STALE4397d

2 messages, 2 authors, 2014-07-21 · open the first message on its own page

[PATCH 2/5] net/rxrpc/ar-key.c: drop negativity check on unsigned value

From: Andrey Utkin <hidden>
Date: 2014-07-18 15:32:14

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80611
Reported-by: David Binderman <redacted>
Signed-off-by: Andrey Utkin <redacted>
---
 net/rxrpc/ar-key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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) {
-- 
1.8.5.5

Re: [PATCH 2/5] net/rxrpc/ar-key.c: drop negativity check on unsigned value

From: David Miller <davem@davemloft.net>
Date: 2014-07-21 04:26:15

From: Andrey Utkin <redacted>
Date: Fri, 18 Jul 2014 18:31:57 +0300
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80611
Reported-by: David Binderman <redacted>
Signed-off-by: Andrey Utkin <redacted>
Applied to net-next, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help