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

Conversation

Projects
None yet
2 participants
@hannob
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

Merge pull request #45 from hannob/master
Fix use after free error.

@mbeijen mbeijen merged commit cf0aa77 into perl5-dbi:master Nov 22, 2015

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

This comment has been minimized.

Show comment
Hide comment
@mbeijen

mbeijen Nov 22, 2015

Contributor

Thanks!

Contributor

mbeijen commented Nov 22, 2015

Thanks!

@hannob

This comment has been minimized.

Show comment
Hide comment
@hannob

hannob Dec 14, 2015

Contributor

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)

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@mbeijen

mbeijen Dec 15, 2015

Contributor

I just put a test release on CPAN!

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