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 <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a8138f42d4
commit
fa4eff44a6
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td,
|
||||||
|
|
||||||
n_elem = ntohl(*xdr++);
|
n_elem = ntohl(*xdr++);
|
||||||
toklen -= 4;
|
toklen -= 4;
|
||||||
if (n_elem < 0 || n_elem > max_n_elem)
|
if (n_elem > max_n_elem)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
*_n_elem = n_elem;
|
*_n_elem = n_elem;
|
||||||
if (n_elem > 0) {
|
if (n_elem > 0) {
|
||||||
|
|
Loading…
Reference in a new issue