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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Prashant Chinnam <crprashant(at)hotmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, "Ideriha, Takeshi" <iderihatakeshi(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Subject: Re: [PATCH] pgcrypto: Fix sha-crypt rounds= values that do not fit in int (BUG #19743)
Date: 2026-12-02 23:47:06
Message-ID: CAN4CZFOiB55eZpNCFX8AU0=2WrzuOSw-5BydsHyCycJHwr9U9A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the quick update!

One more nitpick question: will the test be stable on slow/heavily
loaded buildfarm animals?

+SET statement_timeout = '1s';
+SELECT crypt('password', '$5$rounds=4294967295$saltsalt$');
+NOTICE: rounds=4294967295 exceeds maximum supported value
(999999999), using 999999999 instead
+ERROR: canceling statement due to statement timeout
+SELECT crypt('password', '$5$rounds=4294968296$saltsalt$');
+NOTICE: rounds=4294968296 exceeds maximum supported value
(999999999), using 999999999 instead
+ERROR: canceling statement due to statement timeout
+SELECT crypt('password', '$5$rounds=99999999999999999999$saltsalt$');
+NOTICE: rounds=9999999999... exceeds maximum supported value
(999999999), using 999999999 instead
+ERROR: canceling statement due to statement timeout
+RESET statement_timeout;

If the query gets killed before px_crypt_shacrypt runs, it won't
generate that notice, and the test run will fail with an output
difference.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-12-03 00:29:01 Re: [PATCH] Report changes discarded for relations not in the subscription
Previous Message Tomas Vondra 2026-12-02 23:43:58 reducing planner memory usage #3 - partition-wise join