Skip to content

Commit

Permalink
net/rxrpc/ar-key.c: drop negativity check on unsigned value
Browse files Browse the repository at this point in the history
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80611
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrey Utkin authored and David S. Miller committed Jul 21, 2014
1 parent a8138f4 commit fa4eff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rxrpc/ar-key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fa4eff4

Please sign in to comment.