berzahx 1
berzahx
PrimeAC 1
PrimeAC
DEVLOPER 1
DEVLOPER
ShadowFon 1
ShadowFon
mavzermete 1
mavzermete
romegames 1
romegames
InfernoShade 1
InfernoShade
Fethi Polat 1
Fethi Polat
Bvural41 1
Bvural41
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com

Fix overflow Martysama GMHosts - Grzyb

  • Konuyu başlatan Konuyu başlatan muchomor1337
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 2
  • Görüntüleme Görüntüleme 751

muchomor1337

Level 2
Üye
Katılım
24 May 2018
Konular
35
Mesajlar
64
Online süresi
16d 13h
Reaksiyon Skoru
89
Altın Konu
0
TM Yaşı
8 Yıl 21 Gün
Başarım Puanı
97
Yaş
34
MmoLira
8,548
DevLira
75
Ticaret - 0%
0   0   0

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Hello, today we will fix a bug that occurs on every Martysama

Error code:

Kod:
READ of size 16 at 0x2223ea1c thread T0
    #1 0x6af0b9 in buffer_write(buffer*&, void const*, int) /home/moje/libthecore/src/buffer.c:167:2
    #2 0x67da99 in CPeerBase::Encode(void const*, unsigned int) /home/moje/db/src/PeerBase.cpp:157:2
    #3 0x565204 in CClientManager::QUERY_BOOT(CPeer*, SPacketGDBoot*) /home/moje/db/src/ClientManager.cpp:466:9
    #4 0x582992 in CClientManager::ProcessPackets(CPeer*) /home/moje/db/src/ClientManager.cpp:2352:5
    #5 0x562fe4 in CClientManager::Process() /home/moje/db/src/ClientManager.cpp:3260:6
    #6 0x5607a5 in CClientManager::MainLoop() /home/moje/db/src/ClientManager.cpp:250:8
    #7 0x666bde in main /home/moje/db/src/Main.cpp:99:29

[Fix]
Find in Clientmanager.cpp
Kod:
    peer->EncodeWORD(16);
    peer->EncodeWORD(vHost.size());

    for (size_t n = 0; n < vHost.size(); ++n)
    {
        peer->Encode(vHost[n].c_str(), 16);
        sys_log(0, "GMHosts %s", vHost[n].c_str());
    }

Change:
Kod:
    peer->EncodeWORD(16);
    peer->EncodeWORD(vHost.size());

    for (size_t n = 0; n < vHost.size(); ++n)
    {
        const char* host = vHost[n].c_str();

        char hostBuffer[16] = {0};
        std::strncpy(hostBuffer, host, sizeof(hostBuffer) - 1);

        peer->Encode(hostBuffer, sizeof(hostBuffer));
        sys_log(0, "GMHosts %s", host);
    }
 
I haven't had this problem on any server.
 
I haven't had this problem on any server.
it is only there booting server
normal player will do nothing, I have a tool that detects leaks and when starting the server it is here
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst