cavedude00 / eqmacemu

Automatically exported from code.google.com/p/eqmacemu
0 stars 1 forks source link

Patch for /trunk/eqmacemu/World/Source/zoneserver_process.cpp #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Unless I am missing something, ZoneServer::ProcessServerOP_ZoneShutdown would 
segfault as currently coded.

zonename should be declared on line 200 as an array large enough to hold the 
maximum possible zonename (+1 for the \0 terminator), otherwise the strcpy on 
line 201 is going to trample over memory. I'm suggesting 64 bytes, I haven't 
looked to see what the length is declared as in the DB.

Original issue reported on code.google.com by steve.en...@gmail.com on 5 Mar 2012 at 9:09

Attachments:

GoogleCodeExporter commented 9 years ago
That should be char zonename[64], not char* zonename[64] ... oops :)

Original comment by steve.en...@gmail.com on 5 Mar 2012 at 9:18