Skip to content

Commit 97b0ef0

Browse files
gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (#129413)
1 parent 4815131 commit 97b0ef0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix an integer overflow in the :mod:`csv` module when writing a data field
2+
larger than 2GB.

Modules/_csv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ join_append_data(WriterObj *self, int field_kind, const void *field_data,
11381138
int copy_phase)
11391139
{
11401140
DialectObj *dialect = self->dialect;
1141-
int i;
1141+
Py_ssize_t i;
11421142
Py_ssize_t rec_len;
11431143

11441144
#define INCLEN \

0 commit comments

Comments
 (0)