mirror of
https://github.com/python/cpython.git
synced 2025-09-25 01:43:11 +00:00
Issue #16975: Fix error handling bug in the escape-decode decoder.
This commit is contained in:
parent
1c60c7ac4c
commit
01b3a08f5e
3 changed files with 50 additions and 0 deletions
|
@ -726,6 +726,10 @@ PyObject *PyString_DecodeEscape(const char *s,
|
|||
errors);
|
||||
goto failed;
|
||||
}
|
||||
/* skip \x */
|
||||
if (s < end && isxdigit(Py_CHARMASK(s[0])))
|
||||
s++; /* and a hexdigit */
|
||||
break;
|
||||
#ifndef Py_USING_UNICODE
|
||||
case 'u':
|
||||
case 'U':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue