mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-140471: Fix buffer overflow in AST node initialization with malformed _fields (#140506)
This commit is contained in:
parent
1a3da2c070
commit
95953b692d
4 changed files with 15 additions and 4 deletions
|
|
@ -1009,7 +1009,7 @@ def visitModule(self, mod):
|
|||
else {
|
||||
if (PyErr_WarnFormat(
|
||||
PyExc_DeprecationWarning, 1,
|
||||
"Field '%U' is missing from %.400s._field_types. "
|
||||
"Field %R is missing from %.400s._field_types. "
|
||||
"This will become an error in Python 3.15.",
|
||||
name, Py_TYPE(self)->tp_name
|
||||
) < 0) {
|
||||
|
|
@ -1044,7 +1044,7 @@ def visitModule(self, mod):
|
|||
// simple field (e.g., identifier)
|
||||
if (PyErr_WarnFormat(
|
||||
PyExc_DeprecationWarning, 1,
|
||||
"%.400s.__init__ missing 1 required positional argument: '%U'. "
|
||||
"%.400s.__init__ missing 1 required positional argument: %R. "
|
||||
"This will become an error in Python 3.15.",
|
||||
Py_TYPE(self)->tp_name, name
|
||||
) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue