Skip to content

Commit d466052

Browse files
gh-114388: Fix an error in GH-114391 (GH-115000)
1 parent 7e42fdd commit d466052

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/structmember.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
208208
if (overflow < 0) {
209209
PyErr_SetString(PyExc_OverflowError,
210210
"Python int too large to convert to C long");
211+
return -1;
211212
}
212213
else if (!overflow) {
213214
*(unsigned int *)addr = (unsigned int)(unsigned long)long_val;
@@ -247,6 +248,7 @@ PyMember_SetOne(char *addr, PyMemberDef *l, PyObject *v)
247248
if (overflow < 0) {
248249
PyErr_SetString(PyExc_OverflowError,
249250
"Python int too large to convert to C long");
251+
return -1;
250252
}
251253
else if (!overflow) {
252254
*(unsigned long *)addr = (unsigned long)long_val;

0 commit comments

Comments
 (0)