mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Rce Fix 3
This commit is contained in:
parent
5d63f83286
commit
7e3b593053
|
|
@ -37,16 +37,24 @@ void TexturePacket::handle(PacketListener *listener)
|
||||||
void TexturePacket::read(DataInputStream *dis) //throws IOException
|
void TexturePacket::read(DataInputStream *dis) //throws IOException
|
||||||
{
|
{
|
||||||
textureName = dis->readUTF();
|
textureName = dis->readUTF();
|
||||||
dwBytes = (DWORD)dis->readShort();
|
short rawBytes = dis->readShort();
|
||||||
|
if(rawBytes <= 0)
|
||||||
if(dwBytes>0)
|
|
||||||
{
|
{
|
||||||
this->pbData= new BYTE [dwBytes];
|
dwBytes = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dwBytes = (DWORD)(unsigned short)rawBytes;
|
||||||
|
if(dwBytes > 65536)
|
||||||
|
{
|
||||||
|
dwBytes = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->pbData= new BYTE [dwBytes];
|
||||||
|
|
||||||
for(DWORD i=0;i<dwBytes;i++)
|
for(DWORD i=0;i<dwBytes;i++)
|
||||||
{
|
{
|
||||||
this->pbData[i] = dis->readByte();
|
this->pbData[i] = dis->readByte();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue