public inbox for [email protected]
help / color / mirror / Atom feedpgsql: Fix expanding 'bounds' in pg_trgm's calc_word_similarity() funct
2+ messages / 1 participants
[nested] [flat]
* pgsql: Fix expanding 'bounds' in pg_trgm's calc_word_similarity() funct
@ 2026-02-20 09:57 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Linnakangas @ 2026-02-20 09:57 UTC (permalink / raw)
To: [email protected]
Fix expanding 'bounds' in pg_trgm's calc_word_similarity() function
If the 'bounds' array needs to be expanded, because the input contains
more trigrams than the initial guess, the code didn't return the
reallocated array correctly to the caller. That could lead to a crash
in the rare case that the input string becomes longer when it's
lower-cased. The only known instance of that is when an ICU locale is
used with certain single-byte encodings. This was an oversight in
commit 00896ddaf41f.
Author: Zsolt Parragi <[email protected]>
Backpatch-through: 18
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/041e02e6a6110af871b909c55f1a1bd9d5a66cdb
Modified Files
--------------
contrib/pg_trgm/trgm_op.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix expanding 'bounds' in pg_trgm's calc_word_similarity() funct
@ 2026-02-20 09:57 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Linnakangas @ 2026-02-20 09:57 UTC (permalink / raw)
To: [email protected]
Fix expanding 'bounds' in pg_trgm's calc_word_similarity() function
If the 'bounds' array needs to be expanded, because the input contains
more trigrams than the initial guess, the code didn't return the
reallocated array correctly to the caller. That could lead to a crash
in the rare case that the input string becomes longer when it's
lower-cased. The only known instance of that is when an ICU locale is
used with certain single-byte encodings. This was an oversight in
commit 00896ddaf41f.
Author: Zsolt Parragi <[email protected]>
Backpatch-through: 18
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/18bcdb75d155e68a9cb34b5b76d0bccd0a234110
Modified Files
--------------
contrib/pg_trgm/trgm_op.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-02-20 09:57 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-20 09:57 pgsql: Fix expanding 'bounds' in pg_trgm's calc_word_similarity() funct Heikki Linnakangas <[email protected]>
2026-02-20 09:57 pgsql: Fix expanding 'bounds' in pg_trgm's calc_word_similarity() funct Heikki Linnakangas <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox