Missing error checks in _PyEval_MatchClass
#110237
Labels
3.11
only security fixes
3.12
bugs and security fixes
3.13
new features, bugs and security fixes
easy
interpreter-core
(Objects, Python, Grammar, and Parser dirs)


Several places in
_PyEval_MatchClasscallPyList_Appendwithout checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C13-L509C26). However,PyList_Appendcan fail. It will only fail if we're out of memory or if we passed a non-list, so it's unlikely to come up in practice, but we should still check for errors.cc @brandtbucher for pattern matching
Linked PRs
PyList_Appendfor errors in_PyEval_MatchClass#110238PyList_Appendfor errors in_PyEval_MatchClass(GH-110238) #110511PyList_Appendfor errors in_PyEval_MatchClass(GH-110238) #110512The text was updated successfully, but these errors were encountered: