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 crashing with older MySQL and new MariaDB clients when prepared statements are used #61

Merged
merged 1 commit into from May 29, 2018

Conversation

pali
Copy link
Member

@pali pali commented May 25, 2018

Fixes commit e295848 as some MySQL and
some MariaDB clients set unitilized or zero value for name_length and
table_length of prepared statements. Problem affects all MySQL client
versions prior to version 5.5.0; all MariaDB clients 10.2.4 and new; and
all MariaDB Connector/C clients.

When using affected client, calculate length manually via strlen() to
prevent using uninitialized or zero length value.

Crash happen when prepared statements are enabled and calling some complex
DBI function like $dbh->selectall_hashref().

…tatements are used

Fixes commit e295848 as some MySQL and
some MariaDB clients set unitilized or zero value for name_length and
table_length of prepared statements. Problem affects all MySQL client
versions prior to version 5.5.0; all MariaDB clients 10.2.4 and new; and
all MariaDB Connector/C clients.

When using affected client, calculate length manually via strlen() to
prevent using uninitialized or zero length value.

Crash happen when prepared statements are enabled and calling some complex
DBI function like $dbh->selectall_hashref().
@pali pali changed the title Fix crashing with older MySQL clients when prepared statements are used Fix crashing with older MySQL and new MariaDB clients when prepared statements are used May 28, 2018
@pali pali merged commit 7c25729 into perl5-dbi:master May 29, 2018
pali added a commit that referenced this pull request May 29, 2018
Fix crashing with older MySQL and new MariaDB clients when prepared statements are used
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

2 participants