Jump to content

Home

Q3Fill Crash on Siege Round End


Wildebeest

Recommended Posts

MovieBattles recently experienced a wave of Q3fill server crashers. The two connections per IP limit did not stop the crash. We discovered that the invalid clients Q3Fill was creating were overrunning the bgForcePowerCost array in the BG_LegalizedForcePowers function.

 

Here's the fix:

In bg_misc.c, in the BG_LegalizedForcePowers function:

usedPoints = 0;
i = 0;
while (i < NUM_FORCE_POWERS)
{
	countDown = 0;

	countDown = final_Powers[i];
	//The next block fixes the crash
	if(countDown > 3)
	{
		return -1;
	}
	//End of fix

	while (countDown > 0)
	{
		if(bgForcePowerCost[i][nClass][countDown] > 0)
		{
			usedPoints += bgForcePowerCost[i][nClass][countDown]; //[fp index][fp level]
		}

 

The important thing here is the return. I used the -1 as a flag to drop the clients in w_force.c, but returning 0 also works.

 

Hope no one else has to deal with these *****es.

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...