diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c index 4583257d360f..f4a08c4544d5 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 */