From 67dc6368764d7acb7d613d97e3a6a5094adf2db7 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 17 Jul 2008 20:49:19 +0000 Subject: 2008-07-17 Flávio Cruz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * idvec-auth.c (idvec_merge_auth): Fix size in munmap calls. --- libshouldbeinlibc/ChangeLog | 4 ++++ libshouldbeinlibc/idvec-auth.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'libshouldbeinlibc') diff --git a/libshouldbeinlibc/ChangeLog b/libshouldbeinlibc/ChangeLog index 968f836d..59174117 100644 --- a/libshouldbeinlibc/ChangeLog +++ b/libshouldbeinlibc/ChangeLog @@ -1,3 +1,7 @@ +2008-07-17 Flávio Cruz + + * idvec-auth.c (idvec_merge_auth): Fix size in munmap calls. + 2008-03-19 Marc-Olivier Mercier * ugids-argp.c (parse_opt): Check NULL condition for struct passwd diff --git a/libshouldbeinlibc/idvec-auth.c b/libshouldbeinlibc/idvec-auth.c index 90452974..30f3ac2a 100644 --- a/libshouldbeinlibc/idvec-auth.c +++ b/libshouldbeinlibc/idvec-auth.c @@ -70,13 +70,13 @@ idvec_merge_auth (struct idvec *eff_uids, struct idvec *avail_uids, /* Deallocate any out-of-line memory we got back. */ if (_eff_uids != eff_uid_buf) - munmap ((caddr_t) _eff_uids, num_eff_uids); + munmap ((caddr_t) _eff_uids, num_eff_uids * sizeof (uid_t)); if (_avail_uids != avail_uid_buf) - munmap ((caddr_t) _avail_uids, num_avail_uids); + munmap ((caddr_t) _avail_uids, num_avail_uids * sizeof (uid_t)); if (_eff_gids != eff_gid_buf) - munmap ((caddr_t) _eff_gids, num_eff_gids); + munmap ((caddr_t) _eff_gids, num_eff_gids * sizeof (gid_t)); if (_avail_gids != avail_gid_buf) - munmap ((caddr_t) _avail_gids, num_avail_gids); + munmap ((caddr_t) _avail_gids, num_avail_gids * sizeof (gid_t)); return err; } -- cgit v1.2.3