summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ssl/t1_trce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c
index 4725185e79..6d314c5331 100644
--- a/ssl/t1_trce.c
+++ b/ssl/t1_trce.c
@@ -1345,7 +1345,8 @@ static int ssl_print_compressed_certificates(BIO *bio, const SSL_CONNECTION *sc,
if (!ossl_comp_has_alg(alg))
return 0;
- if (uclen == 0 || (ucdata = OPENSSL_malloc(uclen)) == NULL)
+ /* Check against certificate maximum size (coverity) */
+ if (uclen == 0 || uclen > 0xFFFFFF || (ucdata = OPENSSL_malloc(uclen)) == NULL)
return 0;
switch (alg) {