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

Add option for max length prefix size #24

Closed
Minikloon opened this issue Jan 23, 2017 · 1 comment
Closed

Add option for max length prefix size #24

Minikloon opened this issue Jan 23, 2017 · 1 comment
Assignees
Milestone

Comments

@Minikloon
Copy link

MCPE packet 0x38 originating from the client sets a Minecraft block metadata by sending its nbt.

Clients may fool servers and cause performance issues by spamming max size length prefixes in that nbt. fNbt will allocate these massive arrays and this may cause OutOfMemoryExceptions.

Affected tags:

  • Byte array
  • String
  • List
  • Int array

I suggest adding a MaxBufferSize property to NbtBinaryReader with a convenience proxy in NbtFile.

@mstefarov
Copy link
Owner

Hmm this is an interesting problem that I have not considered. Thanks for bringing it up. I will prioritize this for the next release.

@mstefarov mstefarov self-assigned this Jan 23, 2017
@mstefarov mstefarov added this to the 0.6.4 milestone Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants