From 28b5bb33ea8640b6ee1e67b4af7b36b81a7d2659 Mon Sep 17 00:00:00 2001 From: Gustavo Niemeyer Date: Thu, 26 Jun 2003 14:41:08 +0000 Subject: [PATCH] Fixing bug described in patch #756032, where SRE reads invalid data due to a corrupted end pointer. --- Modules/_sre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_sre.c b/Modules/_sre.c index 3f9a2d3eb42..a8a97748b19 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;