summaryrefslogtreecommitdiffstats
path: root/lib/libutil/gr_util.c
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-12-27 20:31:12 +0000
committerbapt <bapt@FreeBSD.org>2012-12-27 20:31:12 +0000
commit85f7f7664e7b3873fec0954f8300bb43549e331c (patch)
treeed67e801414c27e1ca1f90faf01e71e7e1aa57c3 /lib/libutil/gr_util.c
parent85a7bc88636c4a46a80bb6c42be258f2efc6b20b (diff)
downloadFreeBSD-src-85f7f7664e7b3873fec0954f8300bb43549e331c.zip
FreeBSD-src-85f7f7664e7b3873fec0954f8300bb43549e331c.tar.gz
cast to uintptr_t to properly calculate offset
Reported by: mdf Submitted by: db
Diffstat (limited to 'lib/libutil/gr_util.c')
-rw-r--r--lib/libutil/gr_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c
index 4583257..f4a08c4 100644
--- a/lib/libutil/gr_util.c
+++ b/lib/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 */
OpenPOWER on IntegriCloud