# HG changeset patch # User Richard Stallman # Date 831837952 0 # Node ID 1912d46c2c6ba1595920db5b3cbe2b84dc516c3f # Parent e54f6bf3d960cce02077176cdb484d6bfab2ff96 (re_match_2_internal): Fix off-by-one error; don't use length of exactn as character, and don't use length of bitmap of charset as bitmap. diff --git a/regex.c b/regex.c --- a/regex.c +++ b/regex.c @@ -4505,9 +4505,9 @@ #endif if ((re_opcode_t) p1[3] == exactn - && ! ((int) p2[1] * BYTEWIDTH > (int) p1[4] - && (p2[1 + p1[4] / BYTEWIDTH] - & (1 << (p1[4] % BYTEWIDTH))))) + && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5] + && (p2[2 + p1[5] / BYTEWIDTH] + & (1 << (p1[5] % BYTEWIDTH))))) { p[-3] = (unsigned char) pop_failure_jump; DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",