diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-10-20 14:41:29 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-10-20 14:41:29 (GMT) |
| commit | 1e78ed6825701029aa45a68f9e62dd3bb8d4e928 (patch) | |
| tree | b3193d19bb7ba1e10b19f99d225930a415300640 /Objects/unicodeobject.c | |
| parent | 9c23b173b823b5e6da01d85c570c7ae2ab07b38b (diff) | |
| download | cpython-1e78ed6825701029aa45a68f9e62dd3bb8d4e928.zip cpython-1e78ed6825701029aa45a68f9e62dd3bb8d4e928.tar.gz cpython-1e78ed6825701029aa45a68f9e62dd3bb8d4e928.tar.bz2 | |
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (GH-4058) (#4059)
and in codecs.escape_decode() when decode an escaped non-ascii byte.
(cherry picked from commit 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f)
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index e9fc658..64905e8 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -6174,7 +6174,7 @@ PyUnicode_DecodeUnicodeEscape(const char *s, if (first_invalid_escape != NULL) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "invalid escape sequence '\\%c'", - *first_invalid_escape) < 0) { + (unsigned char)*first_invalid_escape) < 0) { Py_DECREF(result); return NULL; } |
