Re: Small patch to improve safety of utf8_to_unicode().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small patch to improve safety of utf8_to_unicode().
Date: 2026-07-15 22:25:23
Message-ID: 3590905.1784154323@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> 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.

Master seems sufficient.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Zsolt Parragi 2026-07-15 22:10:48 Re: pg_hosts: Add pg_hosts_file_rules()