Hi,
Patch attached to fix some sillyness in pgp_expect_packet_end() and
pgp_skip_packet(). Will add to the next commitfest unless someone picks
this one up before that.
.marko
*** a/contrib/pgcrypto/pgp-decrypt.c
--- b/contrib/pgcrypto/pgp-decrypt.c
***************
*** 1069,1075 **** pgp_skip_packet(PullFilter *pkt)
while (res > 0)
res = pullf_read(pkt, 32 * 1024, &tmp);
! return res < 0 ? res : 0;
}
/*
--- 1069,1075 ----
while (res > 0)
res = pullf_read(pkt, 32 * 1024, &tmp);
! return res;
}
/*
***************
*** 1078,1096 **** pgp_skip_packet(PullFilter *pkt)
int
pgp_expect_packet_end(PullFilter *pkt)
{
! int res = 1;
uint8 *tmp;
! while (res > 0)
{
! res = pullf_read(pkt, 32 * 1024, &tmp);
! if (res > 0)
! {
! px_debug("pgp_expect_packet_end: got data");
! return PXE_PGP_CORRUPT_DATA;
! }
}
! return res < 0 ? res : 0;
}
int
--- 1078,1093 ----
int
pgp_expect_packet_end(PullFilter *pkt)
{
! int res;
uint8 *tmp;
! res = pullf_read(pkt, 32 * 1024, &tmp);
! if (res > 0)
{
! px_debug("pgp_expect_packet_end: got data");
! return PXE_PGP_CORRUPT_DATA;
}
! return res;
}
int
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers