diff options
author | bapt <bapt@FreeBSD.org> | 2012-12-27 20:31:12 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-12-27 20:31:12 +0000 |
commit | 85f7f7664e7b3873fec0954f8300bb43549e331c (patch) | |
tree | ed67e801414c27e1ca1f90faf01e71e7e1aa57c3 /lib/libutil | |
parent | 85a7bc88636c4a46a80bb6c42be258f2efc6b20b (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libutil/gr_util.c | 2 |
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 */ |