summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgp-decrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/pgp-decrypt.c')
-rw-r--r--contrib/pgcrypto/pgp-decrypt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c
index 1817361075..1fc4f4feb0 100644
--- a/contrib/pgcrypto/pgp-decrypt.c
+++ b/contrib/pgcrypto/pgp-decrypt.c
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-decrypt.c,v 1.3 2005/07/18 16:35:06 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/pgcrypto/pgp-decrypt.c,v 1.4 2005/07/18 17:09:01 tgl Exp $
*/
#include "postgres.h"
@@ -339,7 +339,6 @@ static void mdc_free(void *priv)
ctx->mdc_ctx = NULL;
}
-/* fixme: clarify */
static int mdc_finish(PGP_Context *ctx, PullFilter *src,
int len, uint8 **data_p)
{
@@ -364,6 +363,7 @@ static int mdc_finish(PGP_Context *ctx, PullFilter *src,
return 0;
}
+ /* safety check */
if (ctx->in_mdc_pkt > 1)
{
px_debug("mdc_finish: several times here?");
@@ -371,6 +371,7 @@ static int mdc_finish(PGP_Context *ctx, PullFilter *src,
}
ctx->in_mdc_pkt++;
+ /* is the packet sane? */
if (res != 20)
{
px_debug("mdc_finish: read failed, res=%d", res);