postgresql/src
Tom Lane 769908811b Fix ancient bug in parsing of BRE-mode regular expressions.
brenext(), when parsing a '*' quantifier, forgot to return any "value"
for the token; per the equivalent case in next(), it should return
value 1 to indicate that greedy rather than non-greedy behavior is
wanted.  The result is that the compiled regexp could behave like 'x*?'
rather than the intended 'x*', if we were unlucky enough to have
a zero in v->nextvalue at this point.  That seems to happen with some
reliability if we have '.*' at the beginning of a BRE-mode regexp,
although that depends on the initial contents of a stack-allocated
struct, so it's not guaranteed to fail.

Found by Alexander Lakhin using valgrind testing.  This bug seems
to be aboriginal in Spencer's code, so back-patch all the way.

Discussion: https://postgr.es/m/16814-6c5e3edd2bdf0d50@postgresql.org
2021-01-08 12:16:00 -05:00
..
backend Fix ancient bug in parsing of BRE-mode regular expressions. 2021-01-08 12:16:00 -05:00
bin Adjust createdb TAP tests to work on recent OpenBSD. 2021-01-07 20:36:09 -05:00
common Replace use of sys_siglist[] with strsignal(). 2020-07-15 22:05:12 -04:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Detect the deadlocks between backends and the startup process. 2021-01-06 12:31:55 +09:00
interfaces Stamp 11.10. 2020-11-09 17:28:11 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Further fix thinko in plpgsql memory leak fix. 2020-12-28 11:55:41 -05:00
port Stamp 11.10. 2020-11-09 17:28:11 -05:00
template On macOS, use -isysroot in link steps as well as compile steps. 2020-11-20 00:58:26 -05:00
test Fix numeric_power() when the exponent is INT_MIN. 2021-01-05 11:05:58 +00:00
timezone Update time zone data files to tzdata release 2020d. 2020-10-22 21:24:12 -04:00
tools backpatch "jit: Add support for LLVM 12." 2020-12-07 18:40:27 -08:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00