Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes from_bytes throwing split_to out of bounds error #486

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

asodugf12
Copy link

@asodugf12 asodugf12 commented Jan 20, 2025

Description

Replaces the code that consumes the name, because it only consumes 1 byte instead of the full 2 byte length and the name itself. This causes the code to split the string at a position way bigger than the buffer itself could hold.

The new code instead skips the bytes that store the name, however this could be simply changed to return the name if it is needed.

Fixes #420
(Partially)

@Snowiiii
Copy link
Member

Oh very nice, I wonder if you can may replace fastnbt now with our nbt crate ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Completely replace fastnbt with our own NBT crate
2 participants