michelp / pgsodium

Modern cryptography for PostgreSQL using libsodium.
Other
546 stars 32 forks source link

Fix for crypto_sign_init bug found by marc. #14

Closed marcmunro closed 4 years ago

marcmunro commented 4 years ago

Michel, I found a bug in crypto_sign_init(). I had incorrectly set the VARSIZE attribute of the bytea result. This is now fixed. I noticed also that VARSIZE was not explicitly set in crypto_sign_final_create(). I assume that _pgsodium_zalloc_bytea() does this, but I prefer to see the explicit assignment inline. Feel free to edit as you see fit.

__ Marc

michelp commented 4 years ago

This was fixed by removing the bogus SET_VARSIZE. Thanks!