]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_mblen_range, pg_mblen_with_len: Valgrind after encoding ereport.
authorNoah Misch <noah@leadboat.com>
Sat, 14 Feb 2026 20:16:16 +0000 (12:16 -0800)
committerNoah Misch <noah@leadboat.com>
Sat, 14 Feb 2026 20:16:20 +0000 (12:16 -0800)
commit45eb47230d93a652873e9b0f94e2f1b04181a8cc
tree87fa58246e54f633847e2ab73229d048f978a4c4
parentc66f4cff1a2e968ff86ffa6608ae8db12f7b1b31
pg_mblen_range, pg_mblen_with_len: Valgrind after encoding ereport.

The prior order caused spurious Valgrind errors.  They're spurious
because the ereport(ERROR) non-local exit discards the pointer in
question.  pg_mblen_cstr() ordered the checks correctly, but these other
two did not.  Back-patch to v14, like commit
1e7fe06c10c0a8da9dd6261a6be8d405dc17c728.

Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/20260214053821.fa.noahmisch@microsoft.com
Backpatch-through: 14
src/backend/utils/mb/mbutils.c