mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10692] Fixed wrongly use %d for guids in DB queries.
This can affect correct result in cases big guid values (out of range for possitive part of int32 range) at x86 platforms. Some other cases addded in addition to original patch fixes where %d wrongly/unsafe used for unsigned values. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
10d3d3ce24
commit
ee8cc71e38
16 changed files with 46 additions and 43 deletions
|
|
@ -6464,8 +6464,8 @@ bool ChatHandler::HandleAccountSetAddonCommand(char* args)
|
|||
return false;
|
||||
|
||||
// No SQL injection
|
||||
LoginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'",lev,account_id);
|
||||
PSendSysMessage(LANG_ACCOUNT_SETADDON,account_name.c_str(),account_id,lev);
|
||||
LoginDatabase.PExecute("UPDATE account SET expansion = '%u' WHERE id = '%u'", lev, account_id);
|
||||
PSendSysMessage(LANG_ACCOUNT_SETADDON,account_name.c_str(), account_id, lev);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue