diff options
author | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2012-09-07 16:53:15 +0000 |
---|---|---|
committer | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2012-09-07 16:53:15 +0000 |
commit | e6d24c358d0c0ad9249044dad09e63e039c527e1 (patch) | |
tree | 97b93e538eb697965f925b7935aa8842ff145dcb | |
parent | 10077317cd2cb2fb269b5d3ab8de60b02d0aa145 (diff) | |
download | mysqldb1-e6d24c358d0c0ad9249044dad09e63e039c527e1.tar.gz |
Fix: Error is not checked if mysql_store_result returns NULL (#3546166)
-rw-r--r-- | MySQLdb/_mysql.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 6a1aa91..2c2d453 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -381,6 +381,10 @@ _mysql_ResultObject_Initialize( self->result = result; Py_END_ALLOW_THREADS ; if (!result) { + if (mysql_field_count(&(conn->connection)) > 0) { + _mysql_Exception(conn); + return -1; + } self->converter = PyTuple_New(0); return 0; } |