pgsql: Fix possible buffer overrun in contrib/pg_trgm.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix possible buffer overrun in contrib/pg_trgm.
Дата
Msg-id E1W2lvW-0008Cm-En@gemulon.postgresql.org
обсуждение исходный текст
Список 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
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/72cce2c7806dbe872176d5af929b7f280f144d48

Modified Files
--------------
contrib/pg_trgm/trgm_op.c |   24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix possible buffer overrun in contrib/pg_trgm.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix possible buffer overrun in contrib/pg_trgm.