pgsql: Fix another ancient bug in parsing of BRE-mode regular expressio

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix another ancient bug in parsing of BRE-mode regular expressio
Дата
Msg-id E1lCwdR-0004Ru-H8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e7cddb5f29171a536233acecb7ac9b9c5e1b4c77

Modified Files
--------------
src/backend/regex/regc_lex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: pgsql: Fix "invalid spinlock number: 0" error in pg_stat_wal_receiver.
Следующее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Add nbtree README section on page recycling.