From a24265cfb16c4528759e4148d57a735f39fb7975 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 6 May 2015 19:19:00 -0400 Subject: [PATCH] Fix random magic number in ssl3_output_cert_chain. Per earlier review comment. The number is wrong anyway. (Neither version does anything since init_buf is initialized to a large size and most functions don't bother sizing it. Future work should rewrite all of this to use a CBB.) Change-Id: I3b58672b328396459a34c6403f8bfb77c96efe9c Reviewed-on: https://boringssl-review.googlesource.com/4650 Reviewed-by: Adam Langley --- ssl/s3_both.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 4dd9e526..78425bf2 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -307,7 +307,7 @@ int ssl3_output_cert_chain(SSL *s, CERT_PKEY *cpk) { if (cpk == NULL) { /* TLSv1 sends a chain with nothing in it, instead of an alert. */ - if (!BUF_MEM_grow_clean(s->init_buf, 10)) { + if (!BUF_MEM_grow_clean(s->init_buf, l)) { OPENSSL_PUT_ERROR(SSL, ssl3_output_cert_chain, ERR_R_BUF_LIB); return 0; }