commit | 01b3a08f5ee6f1ffa4ab52e2e9ecd43e0b56bdd9 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Fri Jan 25 23:30:50 2013 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Fri Jan 25 23:30:50 2013 +0200 |
tree | b6bd4be495565dd2a40c2d0159e071abd13ef2a0 | |
parent | 1c60c7ac4cba9b947696f795dc16c8761f6bce38 [diff] [blame] |
Issue #16975: Fix error handling bug in the escape-decode decoder.
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index b9809a2..0664142 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c
@@ -726,6 +726,10 @@ 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':