Skip to content

Commit cdaec31

Browse files
[3.12] gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (GH-129413) (#129437)
gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (GH-129413) (cherry picked from commit 97b0ef0) Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <[email protected]>
1 parent e5ab9e3 commit cdaec31

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
@@ -1074,7 +1074,7 @@ join_append_data(WriterObj *self, int field_kind, const void *field_data,
10741074
int copy_phase)
10751075
{
10761076
DialectObj *dialect = self->dialect;
1077-
int i;
1077+
Py_ssize_t i;
10781078
Py_ssize_t rec_len;
10791079

10801080
#define INCLEN \

0 commit comments

Comments
 (0)