pgsql: Fix potential memory clobber in tsvector_concat().
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Fix potential memory clobber in tsvector_concat(). |
| Дата | |
| Msg-id | E1Qx3ON-0006J9-Ho@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Fix potential memory clobber in tsvector_concat(). tsvector_concat() allocated its result workspace using the "conservative" estimate of the sum of the two input tsvectors' sizes. Unfortunately that wasn't so conservative as all that, because it supposed that the number of pad bytes required could not grow. Which it can, as per test case from Jesper Krogh, if there's a mix of lexemes with positions and lexemes without them in the input data. The fix is to assume that we might add a not-previously-present pad byte for each and every lexeme in the two inputs; which really is conservative, but it doesn't seem worthwhile to try to be more precise. This is an aboriginal bug in tsvector_concat, so back-patch to all versions containing it. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/00eb036c111b8f72a34ca729efccd785761d977e Modified Files -------------- src/backend/utils/adt/tsvector_op.c | 36 +++++++++++++++++++++++++++++----- 1 files changed, 30 insertions(+), 6 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера