Re: [PATCH] pgcrypto: Fix sha-crypt rounds= values that do not fit in int (BUG #19743)

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Prashant Chinnam <crprashant(at)hotmail(dot)com>
Cc: Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [PATCH] pgcrypto: Fix sha-crypt rounds= values that do not fit in int (BUG #19743)
Date: 2026-11-03 01:03:53
Message-ID: 7B8F4098-C9BC-4533-B8D4-305B22DD20D7@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Nov 3, 2026, at 04:49, Prashant Chinnam <crprashant(at)hotmail(dot)com> wrote:
>
>> This is a pre-existing issue, not a problem introduced
>> by your patch. The code only checks whether endp
>> points to $, so it doesn't reject an empty rounds
>> value.
>>
>> I'm fine if you prefer not to include this in the
>> current patch. In that case, I can propose a separate
>> patch.
>
> Agreed, an empty rounds= silently clamping to 1000 does
> not look right, and checking num == endp would fix it.
> I would still prefer to keep it out of this patch: it is
> a behavior change (a new ERROR for input that is accepted
> today) beyond the reported bug, and I would rather not
> widen the scope of a patch that is meant to be
> backpatched to REL_18_STABLE. Please do propose it as
> a separate patch, as you offered; it stands on its own
> that way.

No problem, I will propose a patch for that.

>
> Regards,
> Prashant Chinnam<v5-0001-pgcrypto-Fix-sha-crypt-rounds-values-that-do-not-fit.patch>

Thanks for updating the patch. I will review v5 today.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Narek Galstyan 2026-11-03 01:06:59 Unlogged bloom indexes break after crash recovery
Previous Message surya poondla 2026-11-03 00:33:01 Re: Reject unsupported COPY FROM targets before analyzing WHERE clause