git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 614b7f1) | patch
Fix another ancient bug in parsing of BRE-mode regular expressions.
2021年2月19日 03:38:55 +0000 (22:38 -0500)
2021年2月19日 03:38:55 +0000 (22:38 -0500)
commit b5a66e7353ba65c11c5fc6a79b72213bde8dbe44
Fix another ancient bug in parsing of BRE-mode regular expressions.

While poking at the regex code, I happened to notice that the bug
squashed in commit afcc8772e had a sibling: next() failed to return
a specific value associated with the '}' token for a "\{m,n\}"
quantifier when parsing in basic RE mode. Again, this could result
in treating the quantifier as non-greedy, which it never should be in
basic mode. For that to happen, the last character before "\}" that
sets "nextvalue" would have to set it to zero, or it'd have to have
accidentally been zero from the start. The failure can be provoked
repeatably with, for example, a bound ending in digit "0".

Like the previous patch, back-patch all the way.
src/backend/regex/regc_lex.c diff | blob | blame | history
src/test/modules/test_regex/expected/test_regex.out diff | blob | blame | history
src/test/modules/test_regex/sql/test_regex.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /