public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bernd Helmle <[email protected]>
To: Andres Freund <[email protected]>
To: Alvaro Herrera <[email protected]>
Cc: Japin Li <[email protected]>
Cc: PostgreSQL Development <[email protected]>
Subject: Re: Modern SHA2- based password hashes for pgcrypto
Date: Mon, 07 Apr 2025 09:09:39 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <utxwivz6ced6jnvxzgs5a37ss636h7aynfrv3gz5iqw34uioem@66tflrtvovrn>
References: <[email protected]>
<[email protected]>
<utxwivz6ced6jnvxzgs5a37ss636h7aynfrv3gz5iqw34uioem@66tflrtvovrn>
Am Sonntag, dem 06.04.2025 um 23:02 -0400 schrieb Andres Freund:
> Hi,
>
> On 2025-04-05 19:22:58 +0200, Alvaro Herrera wrote:
> > I have pushed this now, hoping it won't explode.
>
> I have a WIP patch that adds gcc specific allocator attributes for
> palloc et
> al. Just rebased that. It warns on the new code as follows:
>
> [1489/1804 42 82%] Compiling C object
> contrib/pgcrypto/pgcrypto.so.p/crypt-sha.c.o
> ../../../../../home/andres/src/postgresql/contrib/pgcrypto/crypt-
> sha.c: In function 'px_crypt_shacrypt':
> ../../../../../home/andres/src/postgresql/contrib/pgcrypto/crypt-
> sha.c:605:13: warning: pointer 'cp' may be used after 'pfree' [-Wuse-
> after-free]
> 605 | *cp = '\0';
> | ~~~~^~~~~~
> ../../../../../home/andres/src/postgresql/contrib/pgcrypto/crypt-
> sha.c:533:9: note: call to 'pfree' here
> 533 | pfree(s_bytes);
> | ^~~~~~~~~~~~~~
>
> And it sure seems to have a point. I'm surprised this isn't causing
> wider
> issues...
Indeed. I think this assignment is useless anyways, since s_bytes is
already allocated with palloc0. I must have overseen this one when
rearranging code...but yes, strange that it didn't cause drama.
Thanks
Bernd
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Modern SHA2- based password hashes for pgcrypto
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox