pgsql: Ensure Soundex difference() function handles empty input sanely.
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Ensure Soundex difference() function handles empty input sanely. |
| Дата | |
| Msg-id | E1pyw3t-0007od-IP@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Ensure Soundex difference() function handles empty input sanely. fuzzystrmatch's difference() function assumes that _soundex() always initializes its output buffer fully. This was not so for the case of a string containing no alphabetic characters, resulting in unstable output and Valgrind complaints. Fix by using memset() to fill the whole buffer in the early-exit case. Also make some cosmetic improvements (I didn't care for the random switches between "instr[0]" and "*instr" notation). Report and diagnosis by Alexander Lakhin (bug #17935). Back-patch to all supported branches. Discussion: https://postgr.es/m/17935-b99316aa79c18513@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8084bf9a493d577bb2d0d902388ed3fd48859c05 Modified Files -------------- contrib/fuzzystrmatch/expected/fuzzystrmatch.out | 6 ++++++ contrib/fuzzystrmatch/fuzzystrmatch.c | 15 ++++++++------- contrib/fuzzystrmatch/sql/fuzzystrmatch.sql | 1 + 3 files changed, 15 insertions(+), 7 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера