User Details
User Details
- User Since
- Apr 17 2023, 6:01 PM (71 w, 5 d)
- Availability
- Available
Apr 18 2023
Apr 18 2023
Guldrelokk added a comment to T6455: Bug in regexp library may lead to out-of-bounds read.
Another miscellaneous correction for jimregexp. A condition was copy-pasted from another section without the necessary changes, resulting in incorrect logic. This seems harmless apart from inconsistent error reporting.
diff --git a/regexp/jimregexp.c b/regexp/jimregexp.c index 1a8b8aae6..1b6e1b49c 100644 --- a/regexp/jimregexp.c +++ b/regexp/jimregexp.c @@ -778,7 +778,7 @@ static int regatom(regex_t *preg, int *flagp) preg->err = REG_ERR_NULL_CHAR; return 0; } - if (start == '\\' && *pattern == 0) { + if (end == '\\' && *pattern == 0) { preg->err = REG_ERR_INVALID_ESCAPE; return 0; }