From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Fix for fragile code in ltree/crc32.c
Date: Wed, 19 Aug 2026 10:44:36 +0300
Message-ID: <d42bb121-d126-4834-b034-3de3d320cf1c@iki.fi> (raw)
In-Reply-To: <2cfbc37ae8deccd3825e36b7f31c391cbf8ff9b8.camel@j-davis.com>
References: <2cfbc37ae8deccd3825e36b7f31c391cbf8ff9b8.camel@j-davis.com>
On 19/08/2026 03:05, Jeff Davis wrote:
> The buffer in ltree_crc32_sz() is more than large enough in practice,
> but it didn't explicitly leave room for the NUL byte. Patch attached.
Makes sense.
Looking at pg_strfold() (and other similar functions), there's no
indication that there's an upper bound on the destination size like
this. Does UNICODE_CASEMAP_BUFSZ work for all collation providers and
locales? How about adding a comment in pg_strfold() and friends about that?
- Heikki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: hlinnaka@iki.fi, pgsql@j-davis.com
Subject: Re: Fix for fragile code in ltree/crc32.c
In-Reply-To: <d42bb121-d126-4834-b034-3de3d320cf1c@iki.fi>
References: <2cfbc37ae8deccd3825e36b7f31c391cbf8ff9b8.camel@j-davis.com> <d42bb121-d126-4834-b034-3de3d320cf1c@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox