[CONPY-34] Malformed data in cursor.execute() causes a Segementation Fault Created: 2020-01-24  Updated: 2020-08-12  Resolved: 2020-01-24

Status: Closed
Project: MariaDB Connector/Python
Component/s: DBAPI 2.0
Affects Version/s: None
Fix Version/s: 0.9.53

Type: Task Priority: Major
Reporter: Kenneth Dyer (Inactive) Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Python 3.7.5 on Ubuntu 19.10



 Description   

While testing cursor.executemany() for Docs, I mistyped and called execute() with a tuple of tuples passed as data, which resulted in a segmentation fault.

cur.execute("INSERT INTO test.t1(fname, sname) VALUES (?, ?)", (("Walker", "Percy"), ("Flannery", "O'Connor")))

Believe we should have a check of some kind to prevent malformed data from crashing the program.



 Comments   
Comment by Georg Richter [ 2020-01-24 ]

Fixed. rev. ad8504212e114024d1a5a0f6c72aae6b0b37c8b9

Generated at Thu Feb 08 03:29:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.