Skip to content

Commit 48b87d1

Browse files
[3.13] gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (GH-129413) (#129436)
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 (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
1 parent 8597be4 commit 48b87d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ join_append_data(WriterObj *self, int field_kind, const void *field_data,
11161116
int copy_phase)
11171117
{
11181118
DialectObj *dialect = self->dialect;
1119-
int i;
1119+
Py_ssize_t i;
11201120
Py_ssize_t rec_len;
11211121

11221122
#define INCLEN \

0 commit comments

Comments
 (0)