2025-05-17 12:28:05 +00:00
committed by Git OBS Bridge
parent cd770d6e57
commit c0defb2811

View File

@@ -20,8 +20,8 @@ with _PyUnicode_DecodeUnicodeEscapeInternal().
Misc/NEWS.d/next/Security/2025-05-09-20-22-54.gh-issue-133767.kN2i3Q.rst | 2
Objects/bytesobject.c | 41 ++++---
Objects/unicodeobject.c | 46 +++++---
Parser/string_parser.c | 26 +++--
8 files changed, 170 insertions(+), 57 deletions(-)
Parser/string_parser.c | 28 +++--
8 files changed, 172 insertions(+), 57 deletions(-)
Index: Python-3.12.10/Include/internal/pycore_bytesobject.h
===================================================================
@@ -428,8 +428,15 @@ Index: Python-3.12.10/Objects/unicodeobject.c
Index: Python-3.12.10/Parser/string_parser.c
===================================================================
--- Python-3.12.10.orig/Parser/string_parser.c 2025-04-08 11:35:47.000000000 +0000
+++ Python-3.12.10/Parser/string_parser.c 2025-05-17 12:13:32.669429618 +0000
@@ -181,15 +181,18 @@
+++ Python-3.12.10/Parser/string_parser.c 2025-05-17 12:27:43.308776801 +0000
@@ -1,4 +1,6 @@
#include <Python.h>
+#include "pycore_bytesobject.h" // _PyBytes_DecodeEscape()
+#include "pycore_unicodeobject.h" // _PyUnicode_DecodeUnicodeEscapeInternal()
#include "tokenizer.h"
#include "pegen.h"
@@ -181,15 +183,18 @@
len = p - buf;
s = buf;
@@ -454,7 +461,7 @@ Index: Python-3.12.10/Parser/string_parser.c
Py_XDECREF(u);
Py_DECREF(v);
return NULL;
@@ -202,14 +205,17 @@
@@ -202,14 +207,17 @@
static PyObject *
decode_bytes_with_escapes(Parser *p, const char *s, Py_ssize_t len, Token *t)
{