[SCM] UID Wrapper Repository - branch master updated
Andreas Schneider
asn at samba.org
Mon Jul 31 07:45:22 UTC 2017
The branch, master has been updated
via 111ac8e uwrap: Use calloc to allocate groups array
via 857dba0 uwrap: Fix integer overflowed argument
from 701a0d0 Bump version to 1.2.4
https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 111ac8ebdafacb9370d94bd6eb20ef8ded67ec35
Author: Andreas Schneider <asn at samba.org>
Date: Thu Jul 27 15:55:58 2017 +0200
uwrap: Use calloc to allocate groups array
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit 857dba064c93d4dbef77c2ab00fdb8253b2eee89
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jul 27 15:55:18 2017 +0200
uwrap: Fix integer overflowed argument
Found by Coverity
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
src/uid_wrapper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c
index 0d74d20..b3d12c5 100644
--- a/src/uid_wrapper.c
+++ b/src/uid_wrapper.c
@@ -749,7 +749,7 @@ static int uwrap_pthread_create(pthread_t *thread,
UWRAP_LOCK(uwrap_id);
- args->id->groups = malloc(sizeof(gid_t) * src_id->ngroups);
+ args->id->groups = calloc(src_id->ngroups, sizeof(gid_t));
if (args->id->groups == NULL) {
UWRAP_UNLOCK(uwrap_id);
SAFE_FREE(args->id);
@@ -1035,7 +1035,7 @@ static void uwrap_init_env(struct uwrap_thread *id)
id->ngroups = 0;
free(id->groups);
- id->groups = malloc(sizeof(gid_t) * ngroups);
+ id->groups = calloc(ngroups, sizeof(gid_t));
if (id->groups == NULL) {
UWRAP_LOG(UWRAP_LOG_ERROR,
"Unable to allocate memory");
--
UID Wrapper Repository
More information about the samba-cvs
mailing list