Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548912 - =dev-db/myodbc-5.2.7 - crash in case linked against mariadb 10.X
Summary: =dev-db/myodbc-5.2.7 - crash in case linked against mariadb 10.X
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL: http://bugs.mysql.com/bug.php?id=76984
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-05-08 13:36 UTC by Jaco Kroon
Modified: 2015-08-11 17:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix myodbc crash (myodbc-mariadb-segfault2.patch,594 bytes, patch)
2015-05-08 13:37 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2015-05-08 13:36:29 UTC
when myodbc is linked against newer myodbc versions there is a crash that occurs.  This is because mariadb's versions of my_malloc and my_free does some extra work and the pointer returned by my_malloc is not the pointer returned by malloc().

On the other end, myodbc uses malloc() in one of it's function to allocate memory, and then ends up called my_free() in order to free the memory.

There is a secondary, unsafe memset as well that could also result in major badness in case of malloc() failure.

I've written and uploaded two patches to the referenced bug report, I'll attach the preferred option here.

Reproducible: Always
Comment 1 Jaco Kroon 2015-05-08 13:37:15 UTC
Created attachment 402862 [details, diff]
patch to fix myodbc crash
Comment 2 Brian Evans (RETIRED) gentoo-dev 2015-08-11 17:11:49 UTC
Fixed in myodbc-5.2.7-r2