]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixing bug described in patch #756032, where SRE reads invalid data
authorGustavo Niemeyer <gustavo@niemeyer.net>
Thu, 26 Jun 2003 14:41:08 +0000 (14:41 +0000)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Thu, 26 Jun 2003 14:41:08 +0000 (14:41 +0000)
due to a corrupted end pointer.

Modules/_sre.c

index 3f9a2d3eb42c26f31f976efdf3d40dc33a8d5aa9..a8a97748b197372a18d4222f2c25cedc2ec5dca9 100644 (file)
@@ -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;