This came up during testing. The entire issue is not clear, but here's
the issue filed on Github: "Minor typo change in ssl/s3_enc.c",
https://github.com/openssl/openssl/issues/151:
For c/cpp syntax analysis ambiguities, is it possible to change in
int ssl3_digest_cached_records(SSL *s)
memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST *sizeof(EVP_MD_CTX *));
to
memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST * sizeof(EVP_MD_CTX *));
Adding a space between the "*" and the "sizeof" should be fairly
inert. If it benefits analysis tools, then I think it would be a good
idea.
$ git diff ssl/s3_enc.c
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 6c103a0..8ad5d57 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -617,7 +617,7 @@ int ssl3_digest_cached_records(SSL *s)
/* Allocate handshake_dgst array */
ssl3_free_digest_list(s);
s->s3->handshake_dgst = OPENSSL_malloc(SSL_MAX_DIGEST * sizeof(EVP_MD_CT
- memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST *sizeof(EVP_MD_CTX *));
+ memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST * sizeof(EVP_MD_CTX *));
hdatalen = BIO_get_mem_data(s->s3->handshake_buffer,&hdata);
if (hdatalen <= 0)
{
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 6c103a0..8ad5d57 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -617,7 +617,7 @@ int ssl3_digest_cached_records(SSL *s)
/* Allocate handshake_dgst array */
ssl3_free_digest_list(s);
s->s3->handshake_dgst = OPENSSL_malloc(SSL_MAX_DIGEST *
sizeof(EVP_MD_CTX *));
- memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST *sizeof(EVP_MD_CTX *));
+ memset(s->s3->handshake_dgst,0,SSL_MAX_DIGEST * sizeof(EVP_MD_CTX *));
hdatalen = BIO_get_mem_data(s->s3->handshake_buffer,&hdata);
if (hdatalen <= 0)
{