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

Fix allownil propagated to byte slices as slice elements #374

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

klauspost
Copy link
Collaborator

[][]byte would assume that the byte slices had allownil set. This would cause an extra if x == nil {x = make([]byte,0)} to be inserted on elements.

Regression from #363

`[][]byte` would assume that the byte slices had allownil set. This would cause an extra `if x == nil {x = make([]byte,0)}` to be inserted on elements.

Regression from tinylib#363
@klauspost klauspost merged commit 65798b6 into tinylib:master Oct 22, 2024
4 checks passed
@klauspost klauspost deleted the fix-allownil-on-elements branch October 22, 2024 11:19
klauspost added a commit to klauspost/msgp that referenced this pull request Oct 22, 2024
Similar to tinylib#374 map `[]byte` elements would also inherit allownil unintentionally.
klauspost added a commit that referenced this pull request Oct 22, 2024
* Fix allownil on maps elements
* Also set for primitives.

Similar to #374 map `[]byte` elements would also inherit allownil unintentionally.
@craig65535
Copy link

@klauspost Could a new release be made with this fix?

@klauspost
Copy link
Collaborator Author

@craig65535
Copy link

@klauspost Thank you!

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.

2 participants