filter: use unsigned int to silence static checker warning
This is just a cleanup. My testing version of Smatch warns about this: net/core/filter.c +380 check_load_and_stores(6) warn: check 'flen' for negative values flen comes from the user. We try to clamp the values here between 1 and BPF_MAXINSNS but the clamp doesn't work because it could be negative. This is a bug, but it's not exploitable. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
79de9efdb9
commit
4f25af2782
@@ -436,7 +436,7 @@ error:
|
||||
*
|
||||
* Returns 0 if the rule set is legal or -EINVAL if not.
|
||||
*/
|
||||
int sk_chk_filter(struct sock_filter *filter, int flen)
|
||||
int sk_chk_filter(struct sock_filter *filter, unsigned int flen)
|
||||
{
|
||||
/*
|
||||
* Valid instructions are initialized to non-0.
|
||||
|
||||
Reference in New Issue
Block a user