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

Thread safety with pbkdf2-check.c #134

Closed
Sufi-Al-Hussaini opened this Issue Apr 20, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@Sufi-Al-Hussaini

Sufi-Al-Hussaini commented Apr 20, 2016

I'm sorry if this is not the right place for this question.

I wanted to use your pbkdf2-check.c in another project.
I found that valgrind complained about memory errors relating to these lines:

int pbkdf2_check(char *password, char *hash)
{
        static char *sha, *salt, *h_pw;    // <-- Problem is here

I have setup OpenSSL locking via callbacks and the code otherwise seems to be thread safe.
Is there any specific reason for making these vars static?

@jpmens

This comment has been minimized.

Show comment
Hide comment
@jpmens

jpmens Apr 20, 2016

Owner

Thank you for reporting that. There is, indeed, no reason for the static declaration.

Owner

jpmens commented Apr 20, 2016

Thank you for reporting that. There is, indeed, no reason for the static declaration.

@jpmens jpmens closed this in 00274f6 Apr 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment