summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-10-20 17:08:15 +0300
committerGitHub <noreply@github.com>2017-10-20 17:08:15 +0300
commit56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f (patch)
treeb9bce18e156f23827247be42659d6fe99cd5c1cd /Python
parent525f40d231aba2c004619fc7a5207171ed65b0cb (diff)
downloadcpython-git-56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f.tar.gz
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)
and in codecs.escape_decode() when decode an escaped non-ascii byte.
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 6989965efa..a6cc0f7e04 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -4147,7 +4147,7 @@ decode_utf8(struct compiling *c, const char **sPtr, const char *end)
static int
warn_invalid_escape_sequence(struct compiling *c, const node *n,
- char first_invalid_escape_char)
+ unsigned char first_invalid_escape_char)
{
PyObject *msg = PyUnicode_FromFormat("invalid escape sequence \\%c",
first_invalid_escape_char);