diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2008-07-17 20:49:19 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2008-07-17 20:49:19 +0000 |
commit | 67dc6368764d7acb7d613d97e3a6a5094adf2db7 (patch) | |
tree | 1bb619b84faa310689d716219f8ecd6d3c561de6 | |
parent | b56d41ddda9708948274c269495c3d18ef71cc70 (diff) |
2008-07-17 Flávio Cruz <flaviocruz@gmail.com>
* idvec-auth.c (idvec_merge_auth): Fix size in munmap calls.
-rw-r--r-- | libshouldbeinlibc/ChangeLog | 4 | ||||
-rw-r--r-- | libshouldbeinlibc/idvec-auth.c | 8 |
2 files changed, 8 insertions, 4 deletions
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 <flaviocruz@gmail.com> + + * idvec-auth.c (idvec_merge_auth): Fix size in munmap calls. + 2008-03-19 Marc-Olivier Mercier <mercier.m@sympatico.ca> * 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; } |