mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue