Anti Crash Fix Maybe?
#1

Hello,

Few minutes ago my server was crashing every 5-10 minutes.
I think this was caused by a hacker.
Anyway I have run the gamemode with crashdetect and this came out >

[16:38:45] [debug] Run time error 4: "Array index out of bounds"
[16:38:45] [debug] Accessing element at index 65535 past array upper bound 79
[16:38:45] [debug] AMX backtrace:
[16:38:45] [debug] #0 0005ceb4 in public OnPlayerTakeDamage () from x_gamemode.amx

Which means for some reason a playerid which was 65535 came into OnPlayerTakeDamage, and this caused the server to crash.
So I added ,

if(issuerid > MAX_PLAYERS || playerid > MAX_PLAYERS) return 0;

Under OnPlayerTakeDamage (at the top).

Im not sure if it has been fixed, but the server hasn't been crashed since so I guess it did.

So if someone can confirm that this is working then others can use it too, to prevent crashers.
Reply


Messages In This Thread
Anti Crash Fix Maybe? - by Roel - 13.09.2013, 14:55
Re: Anti Crash Fix Maybe? - by PT - 13.09.2013, 17:41
Re: Anti Crash Fix Maybe? - by Konstantinos - 13.09.2013, 17:48
Re: Anti Crash Fix Maybe? - by Kirollos - 13.09.2013, 17:53
Re: Anti Crash Fix Maybe? - by Konstantinos - 13.09.2013, 17:59
Re: Anti Crash Fix Maybe? - by zrelly - 13.09.2013, 20:58

Forum Jump:


Users browsing this thread: 3 Guest(s)