postgresql/contrib/fuzzystrmatch/expected
Tom Lane 1d369c9e90 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
2023-05-16 10:53:42 -04:00
..
fuzzystrmatch.out Ensure Soundex difference() function handles empty input sanely. 2023-05-16 10:53:42 -04:00
fuzzystrmatch_utf8.out Add support for Daitch-Mokotoff Soundex in contrib/fuzzystrmatch. 2023-04-07 17:32:26 -04:00
fuzzystrmatch_utf8_1.out Add support for Daitch-Mokotoff Soundex in contrib/fuzzystrmatch. 2023-04-07 17:32:26 -04:00