postgresql/contrib/pg_trgm
Thomas Munro c67bef3f32 Code coverage for most pg_mblen* calls.
A security patch changed them today, so close the coverage gap now.
Test that buffer overrun is avoided when pg_mblen*() requires more
than the number of bytes remaining.

This does not cover the calls in dict_thesaurus.c or in dict_synonym.c.
That code is straightforward.  To change that code's input, one must
have access to modify installed OS files, so low-privilege users are not
a threat.  Testing this would likewise require changing installed
share/postgresql/tsearch_data, which was enough of an obstacle to not
bother.

Security: CVE-2026-2006
Backpatch-through: 14
Co-authored-by: Thomas Munro <thomas.munro@gmail.com>
Co-authored-by: Noah Misch <noah@leadboat.com>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
2026-02-09 12:44:12 +13:00
..
data Code coverage for most pg_mblen* calls. 2026-02-09 12:44:12 +13:00
expected Code coverage for most pg_mblen* calls. 2026-02-09 12:44:12 +13:00
sql Code coverage for most pg_mblen* calls. 2026-02-09 12:44:12 +13:00
.gitignore Support "make check" in contrib 2011-04-25 22:27:11 +03:00
Makefile Code coverage for most pg_mblen* calls. 2026-02-09 12:44:12 +13:00
meson.build Code coverage for most pg_mblen* calls. 2026-02-09 12:44:12 +13:00
pg_trgm--1.0--1.1.sql Fix typo in update scripts for some contrib modules. 2013-07-19 04:13:01 +09:00
pg_trgm--1.1--1.2.sql Add word_similarity to pg_trgm contrib module. 2016-03-16 18:59:21 +03:00
pg_trgm--1.2--1.3.sql Make contrib modules' installation scripts more secure. 2020-08-10 10:44:42 -04:00
pg_trgm--1.3--1.4.sql Add strict_word_similarity to pg_trgm module 2018-03-21 14:57:42 +03:00
pg_trgm--1.3.sql Remove support for upgrading extensions from "unpackaged" state. 2020-02-19 16:59:14 -05:00
pg_trgm--1.4--1.5.sql Fix typo in contrib/pg_trgm/pg_trgm--1.4--1.5.sql 2020-11-12 08:55:09 +03:00
pg_trgm--1.5--1.6.sql Handle equality operator in contrib/pg_trgm 2020-11-15 08:52:35 +03:00
pg_trgm.control Handle equality operator in contrib/pg_trgm 2020-11-15 08:52:35 +03:00
trgm.h Replace pg_mblen() with bounds-checked versions. 2026-02-09 12:44:04 +13:00
trgm_gin.c Mark commented out code as unused 2026-01-22 12:44:07 +01:00
trgm_gist.c Fix various instances of undefined behavior 2026-02-04 18:09:35 +07:00
trgm_op.c Replace pg_mblen() with bounds-checked versions. 2026-02-09 12:44:04 +13:00
trgm_regexp.c Replace pg_mblen() with bounds-checked versions. 2026-02-09 12:44:04 +13:00