mirror of https://github.com/python/cpython.git
Fixing bug described in patch #756032, where SRE reads invalid data
due to a corrupted end pointer.
This commit is contained in:
parent
f91888bb46
commit
28b5bb33ea
|
@ -1297,7 +1297,7 @@ SRE_SEARCH(SRE_STATE* state, SRE_CODE* pattern)
|
||||||
|
|
||||||
flags = pattern[2];
|
flags = pattern[2];
|
||||||
|
|
||||||
if (pattern[3] > 0) {
|
if (pattern[3] > 1) {
|
||||||
/* adjust end point (but make sure we leave at least one
|
/* adjust end point (but make sure we leave at least one
|
||||||
character in there, so literal search will work) */
|
character in there, so literal search will work) */
|
||||||
end -= pattern[3]-1;
|
end -= pattern[3]-1;
|
||||||
|
|
Loading…
Reference in New Issue