summaryrefslogtreecommitdiffstats
path: root/libutil
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2012-12-27 20:31:12 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2012-12-27 20:31:12 +0000
commit51b9aa2af727f3e728cf8676626c60a2b08747b5 (patch)
treefc5f92c555200a84d8bf658d10d646d2782fd1d5 /libutil
parentac2faf4bbf898c2f46cb06a82893638622806ac7 (diff)
downloadpw-darwin-51b9aa2af727f3e728cf8676626c60a2b08747b5.tar.gz
pw-darwin-51b9aa2af727f3e728cf8676626c60a2b08747b5.tar.zst
pw-darwin-51b9aa2af727f3e728cf8676626c60a2b08747b5.zip
cast to uintptr_t to properly calculate offset
Reported by: mdf Submitted by: db
Diffstat (limited to 'libutil')
-rw-r--r--libutil/gr_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libutil/gr_util.c b/libutil/gr_util.c
index 4583257..f4a08c4 100644
--- a/libutil/gr_util.c
+++ b/libutil/gr_util.c
@@ -452,7 +452,7 @@ gr_dup(const struct group *gr)
return (NULL);
/* point new gr_mem to end of struct + 1 */
if (gr->gr_mem != NULL)
- newgr->gr_mem = (char **)newgr + sizeof(struct group);
+ newgr->gr_mem = (char **)((uintptr_t)newgr + sizeof(struct group));
else
newgr->gr_mem = NULL;
/* point dst after the end of all the gr_mem pointers in newgr */