Projects
openEuler:24.03:SP1:Everything:64G
libselinux
_service:tar_scm:backport-libselinux-Fix-orderi...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:backport-libselinux-Fix-ordering-of-arguments-to-calloc.patch of Package libselinux
From dfe30d9d0190ede292078d22ed45a160f331e1b6 Mon Sep 17 00:00:00 2001 From: James Carter <jwcart2@gmail.com> Date: Fri, 5 Jan 2024 15:16:26 -0500 Subject: [PATCH] libselinux: Fix ordering of arguments to calloc The number of elements should be first and the size of the elements second. Signed-off-by: James Carter <jwcart2@gmail.com> Reference:https://github.com/SELinuxProject/selinux/commit/dfe30d9d0190ede292078d22ed45a160f331e1b6 Conflict:path adapt --- src/audit2why.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audit2why.c b/src/audit2why.c index 8c4c07d5..ad846cc3 100644 --- a/src/audit2why.c +++ b/src/audit2why.c @@ -148,7 +148,7 @@ static int check_booleans(struct boolean_t **bools) sepol_bool_free(boolean); if (fcnt > 0) { - *bools = calloc(sizeof(struct boolean_t), fcnt + 1); + *bools = calloc(fcnt + 1, sizeof(struct boolean_t)); if (!*bools) { PyErr_SetString( PyExc_MemoryError, "Out of memory\n"); free(foundlist); @@ -226,7 +226,7 @@ static int __policy_init(const char *init_path) return 1; } - avc = calloc(sizeof(struct avc_t), 1); + avc = calloc(1, sizeof(struct avc_t)); if (!avc) { PyErr_SetString( PyExc_MemoryError, "Out of memory\n"); fclose(fp); -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2