|
@@ -463,6 +463,8 @@ static int rsc_parse(struct cache_detail *cd,
|
|
|
/* number of additional gid's */
|
|
/* number of additional gid's */
|
|
|
if (get_int(&mesg, &N))
|
|
if (get_int(&mesg, &N))
|
|
|
goto out;
|
|
goto out;
|
|
|
|
|
+ if (N < 0 || N > NGROUPS_MAX)
|
|
|
|
|
+ goto out;
|
|
|
status = -ENOMEM;
|
|
status = -ENOMEM;
|
|
|
rsci.cred.cr_group_info = groups_alloc(N);
|
|
rsci.cred.cr_group_info = groups_alloc(N);
|
|
|
if (rsci.cred.cr_group_info == NULL)
|
|
if (rsci.cred.cr_group_info == NULL)
|