]> granicus.if.org Git - postgresql/commit
Fix combo_decrypt() to throw an error for zero-length input when using a
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Aug 2007 16:15:51 +0000 (16:15 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Aug 2007 16:15:51 +0000 (16:15 +0000)
commitb918bf86c65632a5716308d8a613f5538a770927
treeb1661776f71fbbd9c0ee6222e7b4222652ed5f35
parent44b5efbae656cba1a8dba79babbe446e31a777d7
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.
contrib/pgcrypto/px.c
contrib/pgcrypto/px.h