summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-getgroups.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-getgroups.c b/tests/test-getgroups.c
index b2e65a02fd..aed80f1813 100644
--- a/tests/test-getgroups.c
+++ b/tests/test-getgroups.c
@@ -52,7 +52,7 @@ main (int argc, char **argv _UNUSED_PARAMETER_)
}
ASSERT (0 <= result);
ASSERT (result + 1 < SIZE_MAX / sizeof *groups);
- groups = malloc (result + 1 * sizeof *groups);
+ groups = malloc ((result + 1) * sizeof *groups);
ASSERT (groups);
groups[result] = -1;
/* Check for EINVAL handling. Not all processes have supplemental