Commit 1b69619e authored by Gerald Carter's avatar Gerald Carter Committed by Gerald (Jerry) Carter
Browse files

r470: BUG 1302: fix seg fault by not trying to optimize a list of invalid gids...

r470: BUG 1302: fix seg fault by not trying to optimize a list of invalid gids using the wrong array size
(This used to be commit 3003769164ed1265f57504f240e56f4a4ba34550)
parent 683d27ff
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -88,6 +88,10 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, in
			groups[0] = gid;
			*grpcnt = ret + 1;
		}
		
		/* remove any duplicates gids in the list */

		remove_duplicate_gids( grpcnt, groups );
	}

	restore_re_gid();
@@ -100,11 +104,6 @@ static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, in
		return -1;
	}
	
	/* this will remove any duplicates gids in the list and 
	   update the group counter */
	   
	remove_duplicate_gids( grpcnt, groups );

	free(gids_saved);
	return ret;
}