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

and fix the use-after-free crash in RT #97625 #27

Merged
merged 3 commits into from Nov 20, 2014

Conversation

rurban
Copy link
Contributor

@rurban rurban commented Aug 1, 2014

No description provided.

Reini Urban added 3 commits July 30, 2014 18:20
honor the pair of allocation/free.
do not free the MYSQL* sock with reconnects to prevent
from nasty use-after-free crashes (RT #97625)

but free it when the connection fails to prevent leaks (RT #86153)
@bigio
Copy link

bigio commented Sep 8, 2014

At line 2103 of dbdimp.c mysql_errno will use data already freed by my_login.

if (!my_login(aTHX_ dbh, imp_dbh))
{
do_error(dbh, mysql_errno(imp_dbh->pmysql),
mysql_error(imp_dbh->pmysql) ,mysql_sqlstate(imp_dbh->pmysql));
return FALSE;
}

@CaptTofu CaptTofu self-assigned this Nov 20, 2014
@CaptTofu CaptTofu merged commit df58d60 into perl5-dbi:master Nov 20, 2014
@iHeadRu iHeadRu mentioned this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants