MySQL + ODBC Seg Fault
Graham Fenner <[email protected]>
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
hello there i hope that you can help me. I am using cryptlib with mysql and myodbc driver on linux. I make a simple certificate as described in the manual, I then open a ODBC database using KeySetOpen .... i checked return errors and they are not returning bad , its just that when i call AddPublicKey(keyset,cryptCertificate). This is a high level function and it will connect to the database. Okay the OPTION which is set on KeySetOpen is NONE because i want it to write. Well, when i call AddPublicKey i get a segmentation fault. I used gdb to debug the problem, it seems that mysqlclient is calling Escape function. Like so : escape_string_for_mysql () from /usr/lib/libmysqlclient_r.so.16 This is where dbg found the segmentation fault signal. I hope you can help me, i even recompiled the crypt source to try and figure what is happening at a lower level. I found that when odbc.c is calling sqlStatus = SQLExecDirect( hStmt, query, queryLength ); that the fault happens. I logged the parameters passed to that, like so : backendType = 3 Bound Data = Bound Data State = 0 query Length = 70 command Length = 70 SQL_QUERY_BUFSIZE = 320 command = INSERT INTO certificates VALUES (?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?) query = INSERT INTO certificates VALUES (?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?) maybe ignore Bound Data , i used %s in printf lol so it searches for null character. Would be interested to hear what i am doing wrong, cheers. _______________________________________________ Cryptlib mailing list [email protected] via Mail: [email protected] Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/ http://news.gmane.org/gmane.comp.encryption.cryptlib Posts from non-subscribed addresses are blocked to prevent spam, please subscribe in order to post messages.