mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Rce Fix 2
This commit is contained in:
parent
126d08a6f8
commit
5d63f83286
|
|
@ -121,7 +121,17 @@ void TextureAndGeometryPacket::read(DataInputStream *dis) //throws IOException
|
||||||
{
|
{
|
||||||
textureName = dis->readUTF();
|
textureName = dis->readUTF();
|
||||||
dwSkinID = (DWORD)dis->readInt();
|
dwSkinID = (DWORD)dis->readInt();
|
||||||
dwTextureBytes = (DWORD)dis->readShort();
|
|
||||||
|
short rawTextureBytes = dis->readShort();
|
||||||
|
if(rawTextureBytes <= 0)
|
||||||
|
{
|
||||||
|
dwTextureBytes = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dwTextureBytes = (DWORD)(unsigned short)rawTextureBytes;
|
||||||
|
if(dwTextureBytes > 65536) dwTextureBytes = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(dwTextureBytes>0)
|
if(dwTextureBytes>0)
|
||||||
{
|
{
|
||||||
|
|
@ -134,7 +144,16 @@ void TextureAndGeometryPacket::read(DataInputStream *dis) //throws IOException
|
||||||
}
|
}
|
||||||
uiAnimOverrideBitmask = dis->readInt();
|
uiAnimOverrideBitmask = dis->readInt();
|
||||||
|
|
||||||
dwBoxC = (DWORD)dis->readShort();
|
short rawBoxC = dis->readShort();
|
||||||
|
if(rawBoxC <= 0)
|
||||||
|
{
|
||||||
|
dwBoxC = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dwBoxC = (DWORD)(unsigned short)rawBoxC;
|
||||||
|
if(dwBoxC > 256) dwBoxC = 0; // sane limit for skin boxes
|
||||||
|
}
|
||||||
|
|
||||||
if(dwBoxC>0)
|
if(dwBoxC>0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue