I was looking through the eMule 0.5a source code, and I noticed
what looks to be a very small bug in RoutingZone.cpp on lines
198 and 286. Both lines read something similar to this:
if (uNumContacts != 0 && uNumContacts * 25 <= (file.GetLength() - file.GetPosition()))
This implies that each contact entry in nodes.dat is 25 bytes.
However, you then go on to read 34 bytes per contact entry.
Just thought that this would save one or two headaches later.
If there is a reason to check for 25 bytes per entry, then
I am wrong.
Thanks,
Ned Bingham
Page 1 of 1
Small Bug In Routingzone.cpp
#2
Posted 15 June 2010 - 06:58 PM
Quote
This implies that each contact entry in nodes.dat is 25 bytes.
No, it implies that each contact entry is at least 25 bytes big (they differ depending on the version) and is just a quick sanity check if the file is corrupted. The one in line 286 indeed checks for the excact size and contacts there will always have that size.
Page 1 of 1










Sign In
Register
