]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Make fallback MD5 implementation thread-safe on big-endian systems
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 7 Aug 2024 07:43:52 +0000 (10:43 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 7 Aug 2024 07:44:05 +0000 (10:44 +0300)
commit0583863e9e6e9ce412bf82658d691370336fa9c0
treeb797ac0248e38b28a263a6c0e316a9b4e37ce0f1
parent2caa85f4aae689e6f6721d7363b4c66a2a6417d6
Make fallback MD5 implementation thread-safe on big-endian systems

Replace a static scratch buffer with a local variable, because a
static buffer makes the function not thread-safe. This function is
used in client-code in libpq, so it needs to be thread-safe. It was
until commit b67b57a966, which replaced the implementation with the
one from pgcrypto.

Backpatch to v14, where we switched to the new implementation.

Reviewed-by: Robert Haas, Michael Paquier
Discussion: https://www.postgresql.org/message-id/dfa2015d-ad21-4802-a4cc-3850fc5fff3f@iki.fi
src/common/md5.c