Kaydet (Commit) 94c3452a authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

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.
üst 137507ea
...@@ -1064,7 +1064,7 @@ else ...@@ -1064,7 +1064,7 @@ else
c -= '0'; c -= '0';
while(i++ < 2 && (pcre_ctypes[ptr[1]] & ctype_digit) != 0 && while(i++ < 2 && (pcre_ctypes[ptr[1]] & ctype_digit) != 0 &&
ptr[1] != '8' && ptr[1] != '9') ptr[1] != '8' && ptr[1] != '9')
c = c * 8 + *(++ptr) - '0'; c = (c * 8 + *(++ptr) - '0') & 255;
break; break;
/* Special escapes not starting with a digit are straightforward */ /* Special escapes not starting with a digit are straightforward */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment