Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Tue, 26 May 2026 06:41:58 +0000 Subject: Re: [pgjdbc/pgjdbc] PR #4016: feat: harden protocol reader against desynced streams (#4015) In-Reply-To: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 4541254436 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 4016 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/4016#issuecomment-4541254436 Content-Type: text/plain; charset=utf-8 I can split the self-contained `GSSInputStream` packet-size cap if that helps, but the other GSS changes use the same `readMessageLength(...)` plumbing as the rest of the PR, so splitting those would create dependent PRs rather than independent review units. I agree a structured descriptor may be better eventually. I intentionally kept `readMessageLength(String, ...)` narrow in this PR because the name is only diagnostic text, not protocol dispatch. Adding an enum raises separate design questions around frontend/backend direction, startup/auth state, replication, and context-specific messages. I am trying to keep this PR focused on enforcing bounds, not redesigning message metadata.