Skip to content

Commit

Permalink
Fixing bug described in patch #756032, where SRE reads invalid data
Browse files Browse the repository at this point in the history
due to a corrupted end pointer.
  • Loading branch information
niemeyer committed Jun 26, 2003
1 parent f91888b commit 28b5bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_sre.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28b5bb3

Please sign in to comment.