pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Small patch to improve safety of utf8_to_unicode().
Date: Wed, 15 Jul 2026 14:39:11 -0700
Message-ID: <55491ca4edb3a78ecd62b8d313eca7dd57de5e79.camel@j-davis.com> (raw)
In-Reply-To: <765830662fd26e0861189c775443fc76ea8213da.camel@j-davis.com>
References: <c355354e6c3f4a7aafb047361b73db247260fca0.camel@j-davis.com>
	<541F240E-94AD-4D65-9794-7D6C316BC3FF@gmail.com>
	<f11b6c89612f89b76b758807a32a1d3769652d90.camel@j-davis.com>
	<C09D685C-FA5C-47E1-8EDB-B1FDD635309F@gmail.com>
	<c4b27c82decf5b85523ad01f1df3785d8999f333.camel@j-davis.com>
	<fbcb039a9ab3ba834f34174915254732fdcfae86.camel@j-davis.com>
	<c82358d3b1bbd250a03937534bf76de9f4250d0c.camel@j-davis.com>
	<fb7979177b7ab44d9abc2d423391de4ad9faea46.camel@j-davis.com>
	<313BCA0E-2E74-4EB6-9AA8-10DB7F439151@gmail.com>
	<592441c1d871a4ed0ac1708e132f447caa35869c.camel@j-davis.com>
	<3058CAA1-40E0-4098-893B-615F77CD35E1@gmail.com>
	<0cedb517aee8b79b8e31a4e42885ed88c2a67c5f.camel@j-davis.com>
	<16CAD4DB-9D4A-481A-BB4E-78775C4F4B2C@gmail.com>
	<f7000dc6842c75ace64656f9bf697a050fda0cfb.camel@j-davis.com>
	<FAEA6374-2ED2-4988-8CDD-95157599024D@gmail.com>
	<3213927.1783950167@sss.pgh.pa.us>
	<ea061fe938602cd4321ed17742284ca86310defe.camel@j-davis.com>
	<3228110.1783963143@sss.pgh.pa.us>
	<3228230.1783963239@sss.pgh.pa.us>
	<765830662fd26e0861189c775443fc76ea8213da.camel@j-davis.com>

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







view thread (27+ messages)  latest in thread

Message-ID: <55491ca4edb3a78ecd62b8d313eca7dd57de5e79.camel@j-davis.com>
Permalink:  ../55491ca4edb3a78ecd62b8d313eca7dd57de5e79.camel@j-davis.com/
Also on:    postgresql.org/message-id/55491ca4edb3a78ecd62b8d313eca7dd57de5e79.camel@j-davis.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, tgl@sss.pgh.pa.us, li.evan.chao@gmail.com
  Subject: Re: Small patch to improve safety of utf8_to_unicode().
  In-Reply-To: <55491ca4edb3a78ecd62b8d313eca7dd57de5e79.camel@j-davis.com>

* 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