The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
Found with: Coverity Prevent CID: 6193
This commit is contained in:
parent
ce9d79aa61
commit
d243a85e99
@ -87,7 +87,7 @@ acl_create_entry_np(acl_t *acl_p, acl_entry_t *entry_p, int offset)
|
||||
|
||||
acl_int = &(*acl_p)->ats_acl;
|
||||
|
||||
if ((acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) || (acl_int->acl_cnt < 0)) {
|
||||
if (acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) {
|
||||
errno = EINVAL;
|
||||
return (-1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user