1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-05 10:17:46 +00:00

Fix oob memory access

This commit is contained in:
Lucy 2023-01-23 21:36:16 +01:00
parent 597c0e9bd2
commit 0a5a556186
3 changed files with 4 additions and 3 deletions

View file

@ -189,7 +189,7 @@ void PlayerMinimal::saveAsNew()
std::vector< uint8_t > howTo( 33 );
std::vector< uint8_t > aetherytes( 16 );
std::vector< uint8_t > discovery( 421 );
std::vector< uint8_t > questComplete( 350 );
std::vector< uint8_t > questComplete( 342 );
std::vector< uint8_t > unlocks( 64 );
std::vector< uint8_t > mountGuide( 15 );
std::vector< uint8_t > orchestrion( 40 );

View file

@ -31,7 +31,7 @@ namespace Sapphire::Entity
using HowToList = std::array< uint8_t, 34 >;
using MinionList = std::array< uint8_t, 40 >;
using MountList = std::array< uint8_t, 22 >;
using QuestComplete = std::array< uint8_t, 350 >;
using QuestComplete = std::array< uint8_t, 342 >;
using Discovery = std::array< uint8_t, 400 >;
using AetheryteList = std::array< uint8_t, 21 >;
using UnlockList = std::array< uint8_t, 64 >;

View file

@ -87,7 +87,8 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
m_data.PermissionInvisibility = 0;
m_data.GrandCompany = player.getGc();
m_data.GrandCompanyRank = player.getGcRankArray()[ player.getGc() - 1 ];
if( m_data.GrandCompany > 0 )
m_data.GrandCompanyRank = player.getGcRankArray()[ player.getGc() - 1 ];
//m_data.u23 = 0x04;
//m_data.u24 = 256;