that could possibly be a serious bug in the packed packet code...
in both the standard code and packed we check the size of the
offset to know whether to send a 64bit op packet or regular one,
in the standard, this is what is written:
Quote
...
void CUpDownClient::CreateStandartPackets(...)
{
...
if (statpos > 0xFFFFFFFF || endpos > 0xFFFFFFFF){
packet = new Packet(OP_SENDINGPART_I64,nPacketSize+32, OP_EMULEPROT, bFromPF);
md4cpy(&packet->pBuffer[0],GetUploadFileID());
PokeUInt64(&packet->pBuffer[16], statpos);
PokeUInt64(&packet->pBuffer[24], endpos);
memfile.Read(&packet->pBuffer[32],nPacketSize);
theStats.AddUpDataOverheadFileRequest(32);
else
...
}
...
void CUpDownClient::CreateStandartPackets(...)
{
...
if (statpos > 0xFFFFFFFF || endpos > 0xFFFFFFFF){
packet = new Packet(OP_SENDINGPART_I64,nPacketSize+32, OP_EMULEPROT, bFromPF);
md4cpy(&packet->pBuffer[0],GetUploadFileID());
PokeUInt64(&packet->pBuffer[16], statpos);
PokeUInt64(&packet->pBuffer[24], endpos);
memfile.Read(&packet->pBuffer[32],nPacketSize);
theStats.AddUpDataOverheadFileRequest(32);
else
...
}
...
while in the packed code it says:
Quote
...
void CUpDownClient::CreatePackedPackets(...)
{
...
if (currentblock->StartOffset > 0xFFFFFFFF || currentblock->EndOffset > 0xFFFFFFFF){
packet = new Packet(OP_COMPRESSEDPART_I64,nPacketSize+28,OP_EMULEPROT,bFromPF);
md4cpy(&packet->pBuffer[0],GetUploadFileID());
PokeUInt64(&packet->pBuffer[16], statpos);
PokeUInt32(&packet->pBuffer[24], newsize);
memfile.Read(&packet->pBuffer[28],nPacketSize);
}
else
...
}
...
void CUpDownClient::CreatePackedPackets(...)
{
...
if (currentblock->StartOffset > 0xFFFFFFFF || currentblock->EndOffset > 0xFFFFFFFF){
packet = new Packet(OP_COMPRESSEDPART_I64,nPacketSize+28,OP_EMULEPROT,bFromPF);
md4cpy(&packet->pBuffer[0],GetUploadFileID());
PokeUInt64(&packet->pBuffer[16], statpos);
PokeUInt32(&packet->pBuffer[24], newsize);
memfile.Read(&packet->pBuffer[28],nPacketSize);
}
else
...
}
...
now if this is suppose to be 64 instead of 32, this code will cause
compressed data from over 4GB to be invalid!
i'm not sure what's suppose to be there (32/64) and
i don't wanna mess with the protocol unless i'm sure.
Kind Regards,
Avi3k
This post has been edited by Avi-3k: 08 October 2006 - 09:18 PM