From: Tom Lane <tgl@sss.pgh.pa.us>
To: d.kovalenko@postgrespro.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18896: A potential problem in heap_page_items (pageinspect, PG-17)
Date: Sat, 19 Apr 2025 15:33:20 -0400
Message-ID: <37900.1745091200@sss.pgh.pa.us> (raw)
In-Reply-To: <18896-add267b8e06663e3@postgresql.org>
References: <18896-add267b8e06663e3@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Please, look at this code in heap_page_items function:
> https://github.com/postgres/postgres/blob/11ff192b5bb707ba9ec13a0b6c7468874403abb3/contrib/pageinspe...
> If lp_len value is less than tuphdr->t_hoff, we get a problem with negative
> value in tuple_data_len
Yeah, you're right.
> I think, we should move the code of /* Copy raw tuple data into bytea
> attribute */ into the next if (.... tuphdr->t_hoff <= lp_len ....)
> section.
Agreed, that looks like a good fix. I'll make it so.
regards, tom lane
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, d.kovalenko@postgrespro.ru, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18896: A potential problem in heap_page_items (pageinspect, PG-17)
In-Reply-To: <37900.1745091200@sss.pgh.pa.us>
* 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