Issue #16975: Fix error handling bug in the escape-decode decoder.

This commit is contained in:
Serhiy Storchaka 2013-01-25 23:30:50 +02:00
parent 1c60c7ac4c
commit 01b3a08f5e
3 changed files with 50 additions and 0 deletions

View file

@ -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':