diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2009-05-28 07:20:52 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2009-05-28 07:20:52 +0000 |
| commit | 60a8b6022dc27a2d41ff9bcb742a90742825c833 (patch) | |
| tree | 6f20ccf49ff2efe8ff781ba8c2f4a3e2300ebdef /lib/libc/posix1e | |
| parent | b78ddb0b8a23f88a52662fe0a0a14397c29e11b3 (diff) | |
Notes
Diffstat (limited to 'lib/libc/posix1e')
| -rw-r--r-- | lib/libc/posix1e/acl_entry.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/posix1e/acl_entry.c b/lib/libc/posix1e/acl_entry.c index aaef6113f6ee..407aff1893a3 100644 --- a/lib/libc/posix1e/acl_entry.c +++ b/lib/libc/posix1e/acl_entry.c @@ -51,7 +51,12 @@ acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p) acl_int = &(*acl_p)->ats_acl; - if ((acl_int->acl_cnt >= ACL_MAX_ENTRIES) || (acl_int->acl_cnt < 0)) { + /* + * +1, because we are checking if there is space left for one more + * entry. + */ + if ((acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) || + (acl_int->acl_cnt < 0)) { errno = EINVAL; return (-1); } |
