Menu

#26 D2BitReader.write() is Totally Buggy

v1.0 (example)
open
nobody
None
5
2021-11-19
2021-11-19
ChthonVII
No

D2BitReader.write() is totally buggy.

To demonstrate, try overwriting an item's fingerprint with 0x00000000 or 0xDEADBEEF or whatever, and then reading back what was written. What you read back will be wildly wrong.

Frankly, I'm surprised that we're not seeing a ton of data corruption when this is used by things like D2Item.set_row().

Here is a correct, though inefficient, implementation of write() if you'd like to borrow it.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB