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

MessagePackSecurity.GetEqualityComparer<object> returns null on copied instances #810

Closed
AArnott opened this issue Feb 7, 2020 · 0 comments · Fixed by #811
Closed

MessagePackSecurity.GetEqualityComparer<object> returns null on copied instances #810

AArnott opened this issue Feb 7, 2020 · 0 comments · Fixed by #811
Assignees
Labels
Milestone

Comments

@AArnott
Copy link
Collaborator

AArnott commented Feb 7, 2020

When a MessagePackSecurity instance is mutated, the copy constructor doesn't initialize its objectFallbackEqualityComparer field, leading to future calls to MessagePackSecurity.GetEqualityComparer<object> to return null.

What's particularly hazardous about this is that null is interpreted by Dictionary<K,V> to mean "default comparer" so it defeats the hash collision resistant fixes we made recently.

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

Successfully merging a pull request may close this issue.

1 participant