diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-25 21:31:43 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-25 21:31:43 (GMT) |
commit | ace3ad3bf79a8a3b0ea9d1de97c8f8b59d1ac7b2 (patch) | |
tree | cdf8d1abca62783de7eafefcc9e924b34f04be2d /Objects | |
parent | 697e56d0f592165209cbeb87583c75dc231c6338 (diff) | |
download | cpython-ace3ad3bf79a8a3b0ea9d1de97c8f8b59d1ac7b2.zip cpython-ace3ad3bf79a8a3b0ea9d1de97c8f8b59d1ac7b2.tar.gz cpython-ace3ad3bf79a8a3b0ea9d1de97c8f8b59d1ac7b2.tar.bz2 |
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/bytesobject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index ef3a5a1..c0f5aff 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -484,6 +484,10 @@ PyObject *PyBytes_DecodeEscape(const char *s, errors); goto failed; } + /* skip \x */ + if (s < end && Py_ISXDIGIT(s[0])) + s++; /* and a hexdigit */ + break; default: *p++ = '\\'; s--; |