Re: Small patch to improve safety of utf8_to_unicode(). - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Small patch to improve safety of utf8_to_unicode().
Date
Msg-id 55491ca4edb3a78ecd62b8d313eca7dd57de5e79.camel@j-davis.com
Whole thread
In response to Re: Small patch to improve safety of utf8_to_unicode().  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Small patch to improve safety of utf8_to_unicode().
List pgsql-hackers
On Mon, 2026-07-13 at 20:26 -0700, Jeff Davis wrote:
> Attached a patch. I added some perl code to check that the expansion
> factor of the UTF8 representation doesn't exceed 3, and added a
> static
> assert in the C code to compare to MaxAllocSize.

I plan to commit this soon. Only to master, unless you'd like me to
backport to silence some coverity warnings.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Next
From: Bruce Momjian
Date:
Subject: Re: First draft of PG 19 release notes