Repository navigation
Conversation
Packet 0x29 (scroll to book) carries both GUIDs straight from the client. The handler checks that the scroll is a scroll and the book is a stored book, then sub_6FC49AE0 compares their suffixes and, on a mismatch, calls FOG_DisplayAssert and exit(-1). A client asking to put a Town Portal scroll into a Tome of Identify therefore shuts down the whole game server. Treat the mismatch like the other invalid-input cases in the function: set *a5 and return 0, which makes the packet handler return 3. The pickup path is unaffected because INVENTORY_FindFillableBook already only returns a book whose suffix matches the scroll. The original assert and exit stay behind NO_BUG_FIX, as agreed in ThePhrozenKeep#14. Fixes ThePhrozenKeep#223
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #223.
Packet 0x29 (put a scroll into a book) takes both item GUIDs from the client. The handler checks that one is a scroll and the other is a stored book, then
sub_6FC49AE0compares their suffixes and, on a mismatch, callsFOG_DisplayAssertfollowed byexit(-1). So a client that asks to put a Town Portal scroll into a Tome of Identify brings the whole server down.This treats the mismatch the same way as the other invalid-input cases in that function: set
*a5and return 0, which makes the packet handler return 3. The pickup path isn't affected, becauseINVENTORY_FindFillableBookalready only returns a book whose suffix matches the scroll.The original assert + exit is kept behind
NO_BUG_FIX, as agreed in #14.I can't build D2MOO locally (32-bit MSVC toolchain), so CI is the real check here.