diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:18:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:18:03 +0000 |
commit | b4b8efbd3826ac0af2d1c2e7c40fcf80a4bfba45 (patch) | |
tree | bec866278030c41c624a91037b1dd88f41c99d8e /contrib/pgcrypto/pgp-decrypt.c | |
parent | Adding upstream version 15.5. (diff) | |
download | postgresql-15-upstream/15.6.tar.xz postgresql-15-upstream/15.6.zip |
Adding upstream version 15.6.upstream/15.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/pgcrypto/pgp-decrypt.c')
-rw-r--r-- | contrib/pgcrypto/pgp-decrypt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c index d12dcad..e1ea5b3 100644 --- a/contrib/pgcrypto/pgp-decrypt.c +++ b/contrib/pgcrypto/pgp-decrypt.c @@ -250,7 +250,8 @@ prefix_init(void **priv_p, void *arg, PullFilter *src) uint8 tmpbuf[PGP_MAX_BLOCK + 2]; len = pgp_get_cipher_block_size(ctx->cipher_algo); - if (len > sizeof(tmpbuf)) + /* Make sure we have space for prefix */ + if (len > PGP_MAX_BLOCK) return PXE_BUG; res = pullf_read_max(src, len + 2, &buf, tmpbuf); |