From d5adcdb437be5813a6e9793084b9c203aea61dbde97da6a594264b6bf60c101d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 22 May 2025 14:14:05 +0000 Subject: [PATCH] Fix patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python311?expand=0&rev=178 --- CVE-2025-4516-DecodeError-handler.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CVE-2025-4516-DecodeError-handler.patch b/CVE-2025-4516-DecodeError-handler.patch index c007aef..23bc56c 100644 --- a/CVE-2025-4516-DecodeError-handler.patch +++ b/CVE-2025-4516-DecodeError-handler.patch @@ -469,7 +469,7 @@ Index: Python-3.11.12/Objects/unicodeobject.c Index: Python-3.11.12/Parser/string_parser.c =================================================================== --- Python-3.11.12.orig/Parser/string_parser.c 2025-04-08 14:15:29.000000000 +0000 -+++ Python-3.11.12/Parser/string_parser.c 2025-05-22 13:00:34.860750605 +0000 ++++ Python-3.11.12/Parser/string_parser.c 2025-05-22 14:13:25.035587017 +0000 @@ -130,13 +130,16 @@ len = p - buf; s = buf; @@ -487,7 +487,7 @@ Index: Python-3.11.12/Parser/string_parser.c - /* We have not decref u before because first_invalid_escape points - inside u. */ + if (v != NULL && first_invalid_escape_ptr != NULL && t != NULL) { -+ if (warn_invalid_escape_sequence(parser, s, first_invalid_escape_ptr, t) < 0) { ++ if (warn_invalid_escape_sequence(parser, first_invalid_escape_ptr, t) < 0) { + /* We have not decref u before because first_invalid_escape_ptr + points inside u. */ Py_XDECREF(u); @@ -511,7 +511,7 @@ Index: Python-3.11.12/Parser/string_parser.c - if (first_invalid_escape != NULL) { - if (warn_invalid_escape_sequence(p, first_invalid_escape, t) < 0) { + if (first_invalid_escape_ptr != NULL) { -+ if (warn_invalid_escape_sequence(p, s, first_invalid_escape_ptr, t) < 0) { ++ if (warn_invalid_escape_sequence(p, first_invalid_escape_ptr, t) < 0) { Py_DECREF(result); return NULL; }