postgresql/src/include
Tom Lane a0c089f33f 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
..
access Remove files signaling a standby promotion request at postmaster startup 2015-09-09 23:01:10 +09:00
bootstrap Fix off-by-one loop count in MapArrayTypeName, and get rid of static array. 2014-12-16 15:35:43 -05:00
catalog Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
commands Test IsInTransactionChain, not IsTransactionBlock, in vac_update_relstats. 2014-10-30 13:03:31 -04:00
datatype Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
executor Ensure that whole-row Vars produce nonempty column names. 2014-11-10 15:21:26 -05:00
foreign Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
lib Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
libpq Remove code to match IPv4 pg_hba.conf entries to IPv4-in-IPv6 addresses. 2015-02-17 12:49:44 -05:00
mb Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
nodes Ensure that whole-row Vars produce nonempty column names. 2014-11-10 15:21:26 -05:00
optimizer Fix some more problems with nested append relations. 2014-10-01 19:30:34 -04:00
parser Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
port Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
portability Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
postmaster Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
regex Add recursion depth protections to regular expression matching. 2015-10-02 14:51:58 -04:00
replication Make SyncRepWakeQueue to a static function 2015-03-26 10:39:52 +09:00
rewrite Avoid getting more than AccessShareLock when deparsing a query. 2014-03-06 19:31:12 -05:00
snowball Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
storage Fix s_lock.h PPC assembly code to be compatible with native AIX assembler. 2015-08-29 16:09:25 -04:00
tcop Be more careful to not lose sync in the FE/BE protocol. 2015-02-02 17:09:35 +02:00
tsearch Predict integer overflow to avoid buffer overruns. 2014-02-17 09:33:33 -05:00
utils Fix subtransaction cleanup after an outer-subtransaction portal fails. 2015-09-04 13:36:50 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
fmgr.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
funcapi.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:31 -04:00
getopt_long.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Fix server header file installation with vpath builds 2011-11-10 20:52:54 +02:00
miscadmin.h Add recursion depth protections to regular expression matching. 2015-10-02 14:51:58 -04:00
pg_config.h.in On Darwin, detect and report a multithreaded postmaster. 2015-01-07 22:41:49 -05:00
pg_config.h.win32 Stamp 9.2.13. 2015-06-09 15:33:16 -04:00
pg_config_manual.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
pg_trace.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pgstat.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
pgtime.h Support timezone abbreviations that sometimes change. 2014-10-16 15:22:20 -04:00
port.h Revert error-throwing wrappers for the printf family of functions. 2015-05-19 18:17:42 -04:00
postgres.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
postgres_ext.h Remove tabs after spaces in C comments 2014-05-06 11:26:27 -04:00
postgres_fe.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
rusagestub.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
windowapi.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00