https://github.com/python/cpython/commit/f699151c8769a63382f9f484581c4d3debda628b
commit: f699151c8769a63382f9f484581c4d3debda628b
branch: 3.12
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-12-26T10:38:48Z
summary:

[3.12] gh-128198: Add missing error checks for usages of PyIter_Next() 
(GH-128199) (GH-128273)

(cherry picked from commit 5c814c83cdd3dc42bd9682106ffb7ade7ce6b5b3)

Co-authored-by: Yan Yanchii <[email protected]>

files:
M Objects/namespaceobject.c

diff --git a/Objects/namespaceobject.c b/Objects/namespaceobject.c
index 2cc4ddd3c91daa..7082c6fd4657c6 100644
--- a/Objects/namespaceobject.c
+++ b/Objects/namespaceobject.c
@@ -121,6 +121,10 @@ namespace_repr(PyObject *ns)
             goto error;
     }
 
+    if (PyErr_Occurred()) {
+        goto error;
+    }
+
     separator = PyUnicode_FromString(", ");
     if (separator == NULL)
         goto error;

_______________________________________________
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