diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-06-26 14:41:08 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2003-06-26 14:41:08 (GMT) |
commit | 28b5bb33ea8640b6ee1e67b4af7b36b81a7d2659 (patch) | |
tree | b58a2ed856fa99cddce64da858aa20782130407c /Modules/_sre.c | |
parent | f91888bb463260fc32e929dae032c8fb05fdd617 (diff) | |
download | cpython-28b5bb33ea8640b6ee1e67b4af7b36b81a7d2659.zip cpython-28b5bb33ea8640b6ee1e67b4af7b36b81a7d2659.tar.gz cpython-28b5bb33ea8640b6ee1e67b4af7b36b81a7d2659.tar.bz2 |
Fixing bug described in patch #756032, where SRE reads invalid data
due to a corrupted end pointer.
Diffstat (limited to 'Modules/_sre.c')
-rw-r--r-- | Modules/_sre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index 3f9a2d3..a8a9774 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1297,7 +1297,7 @@ SRE_SEARCH(SRE_STATE* state, SRE_CODE* pattern) flags = pattern[2]; - if (pattern[3] > 0) { + if (pattern[3] > 1) { /* adjust end point (but make sure we leave at least one character in there, so literal search will work) */ end -= pattern[3]-1; |