Zeex / samp-plugin-crashdetect

Crash/error reporting plugin for SA-MP server
http://forum.sa-mp.com/showthread.php?t=262796
BSD 2-Clause "Simplified" License
116 stars 23 forks source link

Fix lines table overflow detection segfault #101

Closed Cheaterman closed 1 year ago

Zeex commented 2 years ago

Could you write a few lines to explain what this patch does? And where the values 33 and 0x10000 come from?

Cheaterman commented 2 years ago

I think the title explains it pretty well. You're currently reading unmapped memory to find where the lines table ends, and (wrongly) expecting zeroes when you do (instead of garbage or an outright crash).

The values have to do with AMX structure. I honestly do not remember. This is tested, working, and most importantly correct (at least more than the original code...).

Zeex commented 2 years ago

OK, that's great, thanks

Zeex commented 1 year ago

Ended up implementing it a little differently in master.