postgresql/contrib/pg_trgm
Tom Lane f261ad241d Fix possible buffer overrun in contrib/pg_trgm.
Allow for the possibility that folding a string to lower case makes it
longer (due to replacing a character with a longer multibyte character).
This doesn't change the number of trigrams that will be extracted, but
it does affect the required size of an intermediate buffer in
generate_trgm().  Per bug #8821 from Ufuk Kayserilioglu.

Also install some checks that the input string length is not so large
as to cause overflow in the calculations of palloc request sizes.

Back-patch to all supported versions.
2014-01-13 13:07:23 -05:00
..
data trgm - Trigram matching for PostgreSQL 2004-05-31 17:18:12 +00:00
expected Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:22 -05:00
sql Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:22 -05:00
.gitignore Some more gitignore cleanups: cover contrib and PL regression test outputs. 2010-09-22 17:22:53 -04:00
Makefile Blank line Makefile cleanups. 2009-04-28 17:07:50 +00:00
pg_trgm.sql.in Mark contrib's GiST and GIN opclass support functions as STRICT, for safety. 2009-06-11 18:30:03 +00:00
trgm.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
trgm_gin.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
trgm_gist.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
trgm_op.c Fix possible buffer overrun in contrib/pg_trgm. 2014-01-13 13:07:23 -05:00
uninstall_pg_trgm.sql Adjust the APIs for GIN opclass support functions to allow the extractQuery() 2009-03-25 22:19:02 +00:00