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 assert when using HashProviderCng concurrently #100989

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

vcsjones
Copy link
Member

Fixes #100983

When disposing of HashProviderCng, this would null out the _hHash handle. We have asserts elsewhere saying that the handle cannot be null. This may not be true during concurrent (mis-)use.

Instead of disposing and nulling it out, just dispose of it. The p/invoke will throw an ObjectDisposedException when marshaling the disposed handle which is the desired behavior.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@vcsjones vcsjones marked this pull request as draft April 12, 2024 20:23
@vcsjones vcsjones marked this pull request as ready for review April 12, 2024 20:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants