Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6d24c3

Browse filesBrowse files
author
adustman
committed
Fix: Error is not checked if mysql_store_result returns NULL (#3546166)
1 parent 1007731 commit e6d24c3
Copy full SHA for e6d24c3

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎MySQLdb/_mysql.c

Copy file name to clipboardExpand all lines: MySQLdb/_mysql.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ _mysql_ResultObject_Initialize(
381381
self->result = result;
382382
Py_END_ALLOW_THREADS ;
383383
if (!result) {
384+
if (mysql_field_count(&(conn->connection)) > 0) {
385+
_mysql_Exception(conn);
386+
return -1;
387+
}
384388
self->converter = PyTuple_New(0);
385389
return 0;
386390
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.