mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-139283: correctly handle size limit in cursor.fetchmany() (GH-139296) (GH-139441)
Passing a negative or zero size to `cursor.fetchmany()` made it fetch all rows
instead of none.
While this could be considered a security vulnerability, it was decided to treat
this issue as a regular bug as passing a non-sanitized *size* value in the first
place is not recommended.
(cherry picked from commit bc172ee830)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
cd8fc3aad3
commit
cde02ae782
6 changed files with 134 additions and 19 deletions
|
|
@ -35,7 +35,7 @@ typedef struct
|
|||
pysqlite_Connection* connection;
|
||||
PyObject* description;
|
||||
PyObject* row_cast_map;
|
||||
int arraysize;
|
||||
uint32_t arraysize;
|
||||
PyObject* lastrowid;
|
||||
long rowcount;
|
||||
PyObject* row_factory;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue