Official eMule-Board: Not A Bug In Emule's Cupdownclient::createpackedpacket, My Mistake - Official eMule-Board

Jump to content


Page 1 of 1

Not A Bug In Emule's Cupdownclient::createpackedpacket, My Mistake *can be deleted*

#1 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 08 October 2006 - 04:45 PM

as i was looking at the upload code, i've noticed something
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
...
}
...


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
...
}
...


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

retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#2 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3667
  • Joined: 27-June 03

Posted 08 October 2006 - 05:30 PM

Its not supposed to be 64bit at this point, since its not the endoffset but the data size.

Quote

#define OP_COMPRESSEDPART_I64 0xA1 // <HASH 16><StartOffset 8><size 4><Daten len:size>
#define OP_SENDINGPART_I64 0xA2 // <HASH 16><Startoffset 8><Endoffset 8><Daten len:(von-bis)>


#3 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 08 October 2006 - 05:49 PM

thanx,
i get it now, i didn't noticed what is sent after the comma (the second argument).
next time i should read the code better, lol...

btw, some parts in opcodes.h (and other important files) are in German,
it would be nice if they were written in English...

Regards,
Avi3k

This post has been edited by Avi-3k: 08 October 2006 - 05:49 PM

retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users