Fix combo_decrypt() to throw an error for zero-length input when using a

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 10a81b3f2faccd319d671979ff39042778dd6274
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-08-23T16:16:27Z
Releases: 7.3.20
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.

Files

PathChange+/−
contrib/pgcrypto/px.c modified +13 −1