Re: Fix infinite loop from setting scram_iterations to INT_MAX

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kevin K Biju <kevinkbiju@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-03-24T00:59:25Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix integer-overflow problem in scram_SaltedPassword()

On Mon, Mar 24, 2025 at 9:54 AM Michael Paquier <michael@paquier.xyz> wrote:
> On Mon, Mar 24, 2025 at 09:50:36AM +0900, Richard Guo wrote:
> > Nice catch.  The fix looks good to me.  It seems to me that it's fine
> > to go without a test case, since the fix is quite straightforward.
>
> One could argue about using an injection point to force trick the
> iteration loop to be cheaper, but I could not really get excited about
> the coverage vs the cycles spent for it..

Exactly.

Thanks
Richard