Re: libpq: Don't read past the end of a message when tracing it

From: Ana Bobillo <anabobillo3(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Subject: Re: libpq: Don't read past the end of a message when tracing it
Date: 2026-11-08 15:24:57
Message-ID: CAJnxHsjT9JKVj6sf51HuL-5fuy5VSHMGRBM_gn6Hvxi_OLdS7w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

A gentle ping on this series. It is registered in the current
commitfest (https://commitfest.postgresql.org/patch/7533/) still
applies to master, and CFBot is green on all platforms.

In short: 0001 makes every reader in fe-trace.c stop at the end of the
message, so a malformed message is traced as far as it goes instead of
being read past its end; 0002 keeps a pre-3.0 error message from being
traced as a protocol 3 message; 0003 adds a test that traces
well-formed and malformed messages, each in a buffer of exactly its
size.

Any review would be welcome, and I'm glad to rework or split the
series as needed.

Álvaro, Cc'ing you since you suggested bringing it here.

Thanks,
Ana Bobillo

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2026-11-08 15:46:24 Re: First draft of PG 19 release notes
Previous Message Bruce Momjian 2026-11-08 15:16:19 Re: First draft of PG 19 release notes