https://github.com/python/cpython/commit/97b0ef05d987ebef354512b516a246feb411e815
commit: 97b0ef05d987ebef354512b516a246feb411e815
branch: main
author: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) 
<[email protected]>
committer: sobolevn <[email protected]>
date: 2025-01-29T11:15:47Z
summary:

gh-129409: Fix Integer overflow -  SEGV while writing data more than 2GB in CSV 
file (#129413)

files:
A Misc/NEWS.d/next/Library/2025-01-29-14-30-54.gh-issue-129409.JZbOE6.rst
M Modules/_csv.c

diff --git 
a/Misc/NEWS.d/next/Library/2025-01-29-14-30-54.gh-issue-129409.JZbOE6.rst 
b/Misc/NEWS.d/next/Library/2025-01-29-14-30-54.gh-issue-129409.JZbOE6.rst
new file mode 100644
index 00000000000000..7e00b44c0ef471
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-01-29-14-30-54.gh-issue-129409.JZbOE6.rst
@@ -0,0 +1,2 @@
+Fix an integer overflow in the :mod:`csv` module when writing a data field
+larger than 2GB.
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 7ca30e39e00c0c..e5ae853590bf2c 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -1138,7 +1138,7 @@ join_append_data(WriterObj *self, int field_kind, const 
void *field_data,
                  int copy_phase)
 {
     DialectObj *dialect = self->dialect;
-    int i;
+    Py_ssize_t i;
     Py_ssize_t rec_len;
 
 #define INCLEN \

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to