From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix possible buffer overrun in contrib/pg_trgm. |
Date: | 2014-01-13 18:07:54 |
Message-ID: | E1W2lvW-0008Ck-Bk@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
REL9_0_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/f261ad241daa37e3e040e2a43727a3b5703eff87
Modified Files
--------------
contrib/pg_trgm/trgm_op.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-01-13 19:48:20 | pgsql: Make bitmap heap scans show exact/lossy block info in EXPLAIN AN |
Previous Message | Heikki Linnakangas | 2014-01-13 13:45:32 | pgsql: Fix calculation of ISMN check digit. |