diff options
| author | Brian Somers <brian@FreeBSD.org> | 2001-08-20 12:41:36 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 2001-08-20 12:41:36 +0000 |
| commit | 3c321a686f50edc5723120df08651e07b6419b44 (patch) | |
| tree | a338dbd809527b6eef0d9f694fb16f1d731ed3d3 /lib/libc/posix1e/acl_support.c | |
| parent | 468a061e69c12fe35a19783bba29b0709dd5ee40 (diff) | |
Notes
Diffstat (limited to 'lib/libc/posix1e/acl_support.c')
| -rw-r--r-- | lib/libc/posix1e/acl_support.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/posix1e/acl_support.c b/lib/libc/posix1e/acl_support.c index 0ab061ded8d4..791b26b18cef 100644 --- a/lib/libc/posix1e/acl_support.c +++ b/lib/libc/posix1e/acl_support.c @@ -260,7 +260,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf) else i = snprintf(buf, buf_len, "%s", p->pw_name); - if (i >= buf_len) { + if (i < 0 || i >= buf_len) { errno = ENOMEM; return (-1); } @@ -273,7 +273,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf) else i = snprintf(buf, buf_len, "%s", g->gr_name); - if (i >= buf_len) { + if (i < 0 || i >= buf_len) { errno = ENOMEM; return (-1); } |
