Deleted Added
full compact
acl_entry.c (194955) acl_entry.c (208782)
1/*
2 * Copyright (c) 2001-2002 Chris D. Faulhaber
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2001-2002 Chris D. Faulhaber
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_entry.c 194955 2009-06-25 12:46:59Z trasz $");
28__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_entry.c 208782 2010-06-03 14:15:08Z trasz $");
29
30#include <sys/types.h>
31#include "namespace.h"
32#include <sys/acl.h>
33#include "un-namespace.h"
34
35#include <errno.h>
36#include <stdlib.h>

--- 45 unchanged lines hidden (view full) ---

82
83 if (acl_p == NULL) {
84 errno = EINVAL;
85 return (-1);
86 }
87
88 acl_int = &(*acl_p)->ats_acl;
89
29
30#include <sys/types.h>
31#include "namespace.h"
32#include <sys/acl.h>
33#include "un-namespace.h"
34
35#include <errno.h>
36#include <stdlib.h>

--- 45 unchanged lines hidden (view full) ---

82
83 if (acl_p == NULL) {
84 errno = EINVAL;
85 return (-1);
86 }
87
88 acl_int = &(*acl_p)->ats_acl;
89
90 if ((acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) || (acl_int->acl_cnt < 0)) {
90 if (acl_int->acl_cnt + 1 >= ACL_MAX_ENTRIES) {
91 errno = EINVAL;
92 return (-1);
93 }
94
95 if (offset < 0 || offset >= acl_int->acl_cnt) {
96 errno = EINVAL;
97 return (-1);
98 }

--- 49 unchanged lines hidden ---
91 errno = EINVAL;
92 return (-1);
93 }
94
95 if (offset < 0 || offset >= acl_int->acl_cnt) {
96 errno = EINVAL;
97 return (-1);
98 }

--- 49 unchanged lines hidden ---