mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix for bug #110651 (Jitterbug PR#343): only use the low 8 bits of an octal
escape, as documented in the comment for the check_escape() function
This commit is contained in:
parent
a6a0ab4bab
commit
3b96d0b199
1 changed files with 1 additions and 1 deletions
|
@ -1032,7 +1032,7 @@ else
|
||||||
for(c=0, i=0; ptr[i]!=0 && i<3; i++)
|
for(c=0, i=0; ptr[i]!=0 && i<3; i++)
|
||||||
{
|
{
|
||||||
if (( pcre_ctypes[ ptr[i] ] & ctype_odigit) != 0)
|
if (( pcre_ctypes[ ptr[i] ] & ctype_odigit) != 0)
|
||||||
c = c * 8 + ptr[i]-'0';
|
c = (c * 8 + ptr[i]-'0') & 255;
|
||||||
else
|
else
|
||||||
break; /* Non-octal character--break out of the loop */
|
break; /* Non-octal character--break out of the loop */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue