From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4332: fix: limit FINEST Bind, Parse and SimpleQuery log messages to maxLogMessageLength to avoid OOM
Date: Wed, 14 Oct 2026 06:22:27 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4332-rc4267444397@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4332@github.com>
References: <gh-pgjdbc-pgjdbc-4332@github.com>
(on pgjdbc/src/test/java/org/postgresql/core/v3/BindLogTest.java)
With these three values, no limit reaches the check at `BindLog.java:49-55`: at `maxLen = 80` the first value is cut and the loop stops at line 43. The assertion looks only for a trailing `=<`, so it misses `,$2` and `,$2=` as well, and the next assertion accepts the marker anywhere in the line. Please replace this test with a parameterized one over the limits where the cut lands inside `,$i=<` and one character below and above each, plus the full length and one below it, asserting the exact expected line.