postgresql/src/backend/regex
Tom Lane d6270e2df9 Prevent corner-case core dump in rfree().
rfree() failed to cope with the case that pg_regcomp() had initialized the
regex_t struct but then failed to allocate any memory for re->re_guts (ie,
the first malloc call in pg_regcomp() failed).  It would try to touch the
guts struct anyway, and thus dump core.  This is a sufficiently narrow
corner case that it's not surprising it's never been seen in the field;
but still a bug is a bug, so patch all active branches.

Noted while investigating whether we need to call pg_regfree after a
failure return from pg_regcomp.  Other than this bug, it turns out we
don't, so adjust comments appropriately.
2012-07-15 13:28:09 -04:00
..
COPYRIGHT Replace regular expression package with Henry Spencer's latest version 2003-02-05 17:41:33 +00:00
Makefile Back-patch fix for extraction of fixed prefixes from regular expressions. 2012-07-10 18:00:44 -04:00
re_syntax.n Replace regular expression package with Henry Spencer's latest version 2003-02-05 17:41:33 +00:00
regc_color.c Back-patch fix for extraction of fixed prefixes from regular expressions. 2012-07-10 18:00:44 -04:00
regc_cvec.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
regc_lex.c Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
regc_locale.c Teach regular expression operators to honor collations. 2011-04-10 18:03:09 -04:00
regc_nfa.c Back-patch fix for extraction of fixed prefixes from regular expressions. 2012-07-10 18:00:44 -04:00
regc_pg_locale.c Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
regcomp.c Prevent corner-case core dump in rfree(). 2012-07-15 13:28:09 -04:00
rege_dfa.c Back-patch fix for extraction of fixed prefixes from regular expressions. 2012-07-10 18:00:44 -04:00
regerror.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
regexec.c Fix regex back-references that are directly quantified with *. 2012-02-20 00:52:42 -05:00
regfree.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
regprefix.c Back-patch fix for extraction of fixed prefixes from regular expressions. 2012-07-10 18:00:44 -04:00