mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Fix bug reported by atkins@gweep.net; re.compile(r"[\100-\410]")
dumps core. Solution: fix check_escape() to match its comment and use only the low 8 bits of the octal number.
This commit is contained in:
parent
137507ea03
commit
94c3452ade
1 changed files with 1 additions and 1 deletions
|
@ -1064,7 +1064,7 @@ else
|
|||
c -= '0';
|
||||
while(i++ < 2 && (pcre_ctypes[ptr[1]] & ctype_digit) != 0 &&
|
||||
ptr[1] != '8' && ptr[1] != '9')
|
||||
c = c * 8 + *(++ptr) - '0';
|
||||
c = (c * 8 + *(++ptr) - '0') & 255;
|
||||
break;
|
||||
|
||||
/* Special escapes not starting with a digit are straightforward */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue