summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>2025-10-23 15:35:21 (GMT)
committerGitHub <noreply@github.com>2025-10-23 15:35:21 (GMT)
commit95953b692db6cbd88139de12d81fb123293ec2d5 (patch)
tree8747af8202eeb7ad4e18599330125af5e07fce55 /Python/Python-ast.c
parent1a3da2c0700839b6e334e368ff2b600c2389763f (diff)
downloadcpython-95953b692db6cbd88139de12d81fb123293ec2d5.zip
cpython-95953b692db6cbd88139de12d81fb123293ec2d5.tar.gz
cpython-95953b692db6cbd88139de12d81fb123293ec2d5.tar.bz2
gh-140471: Fix buffer overflow in AST node initialization with malformed `_fields` (#140506)
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 660bc59..aac24ed 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -5293,7 +5293,7 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
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) {
@@ -5328,7 +5328,7 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
// 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) {