Jump to content

[patch][7090] Crash fix CMSG_REQUEST_ACCOUNT_DATA with Visual Studio

Guest delavega

Recommended Posts

Just in few cases there appeared account data with type 3 and data was empty, packing of this crashed mangos.

Line: if(compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK) (MiscHandler.cpp - WorldSession::HandleRequestAccountData)

because resize(0) - after this _storage[0] is invalid with newer Visual Studio's

One maybe hacky way to fix it - replace it with this line

if(size && compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)

Link to comment
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use