From: Noah Misch <noah@leadboat.com>
To: sean <zoulx1982@163.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio
Date: Thu, 15 May 2025 20:11:00 -0700
Message-ID: <20250516031100.8c.nmisch@google.com> (raw)
In-Reply-To: <3674cec2.7edf.196cdf19dbf.Coremail.zoulx1982@163.com>
References: <E1uBuN8-000FUw-2N@gemulon.postgresql.org>
<3674cec2.7edf.196cdf19dbf.Coremail.zoulx1982@163.com>
On Wed, May 14, 2025 at 04:38:06PM +0800, sean wrote:
> I read the patch you commit to pgsql, and i found there also some other routine which
> will still call pg_encoding_mblen to get char length.
> I have no idea why these routine don't have to replaced by call pg_encoding_mblen_or_incomplete?
See the pg_encoding_mblen() header comment for the rules on when calling it is
okay. For example, it's okay for NUL-terminated input.
> And how can i do to reproduce this crash?
The patch-added test cases provide some indication on how to reproduce the
crash.
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-committers@postgresql.org
Cc: noah@leadboat.com, zoulx1982@163.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: With GB18030, prevent SIGSEGV from reading past end of allocatio
In-Reply-To: <20250516031100.8c.nmisch@google.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