Skip to content

Commit c1c812a

Browse files
authored
Fix out of range bug (#538)
1 parent 9729618 commit c1c812a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: MySQLdb/_mysql.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ _mysql_ResultObject_fetch_row(
14421442
&maxrows, &how))
14431443
return NULL;
14441444
check_result_connection(self);
1445-
if (how >= (int)sizeof(row_converters)) {
1445+
if (how >= (int)(sizeof(row_converters) / sizeof(row_converters[0]))) {
14461446
PyErr_SetString(PyExc_ValueError, "how out of range");
14471447
return NULL;
14481448
}

0 commit comments

Comments
 (0)