postgresql/src
Tom Lane 20c627707c Add recursion depth protections to regular expression matching.
Some of the functions in regex compilation and execution recurse, and
therefore could in principle be driven to stack overflow.  The Tcl crew
has seen this happen in practice in duptraverse(), though their fix was
to put in a hard-wired limit on the number of recursive levels, which is
not too appetizing --- fortunately, we have enough infrastructure to check
the actually available stack.  Greg Stark has also seen it in other places
while fuzz testing on a machine with limited stack space.  Let's put guards
in to prevent crashes in all these places.

Since the regex code would leak memory if we simply threw elog(ERROR),
we have to introduce an API that checks for stack depth without throwing
such an error.  Fortunately that's not difficult.
2015-10-02 14:51:58 -04:00
..
backend Add recursion depth protections to regular expression matching. 2015-10-02 14:51:58 -04:00
bin pg_rewind: Improve some messages 2015-10-01 21:52:46 -04:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
include Add recursion depth protections to regular expression matching. 2015-10-02 14:51:58 -04:00
interfaces Fix poor errno handling in libpq's version of our custom OpenSSL BIO. 2015-09-28 18:02:44 -04:00
makefiles Link $(WIN32RES) into single-file modules only when PGFILEDESC is set. 2015-08-05 20:45:21 -04:00
pl Fix plperl to handle non-ASCII error message texts correctly. 2015-09-29 10:52:22 -04:00
port Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:29 -04:00
test Fix potential infinite loop in regular expression execution. 2015-10-02 14:26:36 -04:00
timezone Update time zone data files to tzdata release 2015d. 2015-05-15 19:35:29 -04:00
tools Rework the way multixact truncations work. 2015-09-26 19:04:25 +02:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Don't try to create a temp install without abs_top_builddir. 2015-09-28 10:52:19 -04:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:30 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00