https://github.com/python/cpython/commit/d466052ad48091a00a50c5298f33238aff591028
commit: d466052ad48091a00a50c5298f33238aff591028
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-04T17:06:22Z
summary:

gh-114388: Fix an error in GH-114391 (GH-115000)

files:
M Python/structmember.c

diff --git a/Python/structmember.c b/Python/structmember.c
index 18bd486952419b..c9f03a464078d0 100644
--- a/Python/structmember.c
+++ b/Python/structmember.c
@@ -208,6 +208,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
         if (overflow < 0) {
             PyErr_SetString(PyExc_OverflowError,
                             "Python int too large to convert to C long");
+            return -1;
         }
         else if (!overflow) {
             *(unsigned int *)addr = (unsigned int)(unsigned long)long_val;
@@ -247,6 +248,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
         if (overflow < 0) {
             PyErr_SetString(PyExc_OverflowError,
                             "Python int too large to convert to C long");
+            return -1;
         }
         else if (!overflow) {
             *(unsigned long *)addr = (unsigned long)long_val;

_______________________________________________
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