Jump to content

[Proteção] Cube Long_List


tierrilopes

Recommended Posts

Nome: vulnerabilidade cube long_list

 

Afeta: todos os cores

 

Sintomas: servidor vai abaixo, volta atrás no tempo

 

Resolução: Abrir o ficheiro cube.cpp;

 

Procurar por:

 

if (resultText.size() - 20 >= CHAT_MAX_LEN)

{

sys_err("[CubeInfo] Too long cube result list text. (NPC: %d, length: %d)", npcVNUM, resultText.size());

resultText.clear();

resultCount = 0;

}

 

Substituir por:

	int cube_corrigido;
       if (resultText.size() < 20)
       {
           cube_corrigido = 20 - resultText.size();
       }
       else
       {
           cube_corrigido = resultText.size() - 20;
       }
       if (cube_corrigido >= CHAT_MAX_LEN)
       {
           sys_err("[CubeInfo] Lista demasiado grande. (NPC: %d, FIXED_size_value_exygo: %d, length: %d)", npcVNUM, cube_corrigido, resultText.size());
           resultText.clear();
           resultCount = 0;
       }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...