projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
137507e
)
Fix bug reported by atkins@gweep.net; re.compile(r"[\100-\410]")
author
Andrew M. Kuchling
<amk@amk.ca>
Thu, 1 Jun 2000 03:02:48 +0000
(
03:02
+0000)
committer
Andrew M. Kuchling
<amk@amk.ca>
Thu, 1 Jun 2000 03:02:48 +0000
(
03:02
+0000)
dumps core. Solution: fix check_escape() to match its comment and
use only the low 8 bits of the octal number.
Modules/pypcre.c
patch
|
blob
|
history
diff --git
a/Modules/pypcre.c
b/Modules/pypcre.c
index 468751d2c81e2f3c43ac8249aaa6a8a255fef44e..afff59c475d205f2f131cc9849f52d5361089114 100644
(file)
--- a/
Modules/pypcre.c
+++ b/
Modules/pypcre.c
@@
-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 */