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 use after free error. #45

Merged
merged 1 commit into from Nov 22, 2015
Merged

Fix use after free error. #45

merged 1 commit into from Nov 22, 2015

Conversation

@hannob
Copy link
Contributor

hannob commented Nov 14, 2015

When my_login fails the code tries to call mysql_errno on the mysql connection. However my_login has already free'd that connection variable, therefore causing a use-after-free error.

This patch changes that so that the free happens after the call to the error functions.

This was found with the help of Address Sanitizer.

mbeijen added a commit that referenced this pull request Nov 22, 2015
Fix use after free error.
@mbeijen mbeijen merged commit cf0aa77 into perl5-dbi:master Nov 22, 2015
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mbeijen
Copy link
Contributor

mbeijen commented Nov 22, 2015

Thanks!

@hannob
Copy link
Contributor Author

hannob commented Dec 14, 2015

thanks for merging, however can we have a new release to get this out soon? (I think use after free's can be serious and potentially lead to malfunction and security issues)

@mbeijen
Copy link
Contributor

mbeijen commented Dec 15, 2015

I just put a test release on CPAN!

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.