diff options
| author | Tom Lane | 2007-08-23 16:15:51 +0000 |
|---|---|---|
| committer | Tom Lane | 2007-08-23 16:15:51 +0000 |
| commit | b918bf86c65632a5716308d8a613f5538a770927 (patch) | |
| tree | b1661776f71fbbd9c0ee6222e7b4222652ed5f35 /contrib/pgcrypto/px.h | |
| parent | 44b5efbae656cba1a8dba79babbe446e31a777d7 (diff) | |
Fix combo_decrypt() to throw an error for zero-length input when using a
padded encryption scheme. Formerly it would try to access res[(unsigned) -1],
which resulted in core dumps on 64-bit machines, and was certainly trouble
waiting to happen on 32-bit machines (though in at least the known case
it was harmless because that byte would be overwritten after return).
Per report from Ken Colson; fix by Marko Kreen.
Diffstat (limited to 'contrib/pgcrypto/px.h')
| -rw-r--r-- | contrib/pgcrypto/px.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h index 412728e53d..257d6015bc 100644 --- a/contrib/pgcrypto/px.h +++ b/contrib/pgcrypto/px.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $PostgreSQL: pgsql/contrib/pgcrypto/px.h,v 1.17 2007/04/06 05:36:50 tgl Exp $ + * $PostgreSQL: pgsql/contrib/pgcrypto/px.h,v 1.18 2007/08/23 16:15:51 tgl Exp $ */ #ifndef __PX_H @@ -78,6 +78,7 @@ void px_free(void *p); #define PXE_BAD_SALT_ROUNDS -15 #define PXE_MCRYPT_INTERNAL -16 #define PXE_NO_RANDOM -17 +#define PXE_DECRYPT_FAILED -18 #define PXE_MBUF_SHORT_READ -50 |
