Skip to content

Commit

Permalink
Fix bug #2131
Browse files Browse the repository at this point in the history
Interrupting the execution of a prepared statement could cause a crash
Related to acf49f8
  • Loading branch information
renecannao committed Jul 14, 2019
1 parent 37d79ad commit d65f701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3631,7 +3631,7 @@ int MySQL_Session::handler() {
case PROCESSING_STMT_EXECUTE:
{
char sqlstate[10];
if (myconn->mysql) {
if (myconn && myconn->mysql) {
sprintf(sqlstate,"%s",mysql_sqlstate(myconn->mysql));
client_myds->myprot.generate_pkt_ERR(true,NULL,NULL,client_myds->pkt_sid+1,mysql_errno(myconn->mysql),sqlstate,(char *)mysql_stmt_error(myconn->query.stmt));
} else {
Expand Down

0 comments on commit d65f701

Please sign in to comment.