Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149511842
D2023.id4136.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D2023.id4136.diff
View Options
Index: lib/libc/posix1e/acl_calc_mask.c
===================================================================
--- lib/libc/posix1e/acl_calc_mask.c
+++ lib/libc/posix1e/acl_calc_mask.c
@@ -104,6 +104,7 @@
/* if no mask exists, check acl_cnt... */
if (acl_int_new->acl_cnt == ACL_MAX_ENTRIES) {
errno = ENOMEM;
+ acl_free(acl_int_new);
return (-1);
}
/* ...and add the mask entry */
Index: lib/libc/posix1e/acl_strip.c
===================================================================
--- lib/libc/posix1e/acl_strip.c
+++ lib/libc/posix1e/acl_strip.c
@@ -82,8 +82,10 @@
have_mask_entry = 0;
acl_new = acl_init(ACL_MAX_ENTRIES);
- if (acl_new == NULL)
+ if (acl_new == NULL) {
+ acl_free(acl_old);
return (NULL);
+ }
tag = ACL_UNDEFINED_TAG;
/* only save the default user/group/other entries */
@@ -93,17 +95,23 @@
assert(_entry_brand(entry) == ACL_BRAND_POSIX);
- if (acl_get_tag_type(entry, &tag) == -1)
+ if (acl_get_tag_type(entry, &tag) == -1) {
+ acl_free(acl_new);
return (NULL);
+ }
switch(tag) {
case ACL_USER_OBJ:
case ACL_GROUP_OBJ:
case ACL_OTHER:
- if (acl_get_tag_type(entry, &tag) == -1)
+ if (acl_get_tag_type(entry, &tag) == -1) {
+ acl_free(acl_new);
return (NULL);
- if (acl_get_permset(entry, &perm) == -1)
+ }
+ if (acl_get_permset(entry, &perm) == -1) {
+ acl_free(acl_new);
return (NULL);
+ }
if (acl_create_entry(&acl_new, &entry_new) == -1)
return (NULL);
if (acl_set_tag_type(entry_new, tag) == -1)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 25, 11:10 PM (5 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30351008
Default Alt Text
D2023.id4136.diff (1 KB)
Attached To
Mode
D2023: Address memory leaks in the libc posix1e code found by Coverity.
Attached
Detach File
Event Timeline
Log In to Comment