mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 19:31:54 +08:00
Fix out of range bug (#538)
This commit is contained in:
@ -1442,7 +1442,7 @@ _mysql_ResultObject_fetch_row(
|
|||||||
&maxrows, &how))
|
&maxrows, &how))
|
||||||
return NULL;
|
return NULL;
|
||||||
check_result_connection(self);
|
check_result_connection(self);
|
||||||
if (how >= (int)sizeof(row_converters)) {
|
if (how >= (int)(sizeof(row_converters) / sizeof(row_converters[0]))) {
|
||||||
PyErr_SetString(PyExc_ValueError, "how out of range");
|
PyErr_SetString(PyExc_ValueError, "how out of range");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user