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

mbedtls: mutex initialisation on Windows #1

Merged
merged 1 commit into from Jan 9, 2019
Merged

Conversation

thenextman
Copy link
Member

Change threading_mutex_init_windows to match threading_mutex_init_pthread behaviour (https://github.com/Devolutions/mbedtls/blob/development/library/threading.c#L71).

The check of mutex->is_valid is not valid (!) because the mutex parameter may not have been initialized yet.

This can crash us e.g. when initializing entropy

Alternative fix would be here: https://github.com/Devolutions/mbedtls/blob/development/library/entropy.c#L68. We could zero the entire ctx instead of ctx->source.

Copy link

@awakecoding awakecoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@awakecoding awakecoding merged commit 7a83a31 into wayk Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants