[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
bernd.edlinger at hotmail.de
bernd.edlinger at hotmail.de
Fri Feb 9 18:56:04 UTC 2018
The branch OpenSSL_1_0_2-stable has been updated
via 575c69f97ca7c8cfaf2a448272f7a1615308acdd (commit)
from 48081cf988fc8f50215a2b18babd6a7859defd36 (commit)
- Log -----------------------------------------------------------------
commit 575c69f97ca7c8cfaf2a448272f7a1615308acdd
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Fri Feb 9 19:31:36 2018 +0100
Swap the check in ssl3_write_pending to avoid using
the possibly indeterminate pointer value in wpend_buf.
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5309)
-----------------------------------------------------------------------
Summary of changes:
ssl/s3_pkt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index d74a91d..c79a507 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -1096,10 +1096,9 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf,
int i;
SSL3_BUFFER *wb = &(s->s3->wbuf);
-/* XXXX */
if ((s->s3->wpend_tot > (int)len)
- || ((s->s3->wpend_buf != buf) &&
- !(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER))
+ || (!(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)
+ && (s->s3->wpend_buf != buf))
|| (s->s3->wpend_type != type)) {
SSLerr(SSL_F_SSL3_WRITE_PENDING, SSL_R_BAD_WRITE_RETRY);
return (-1);
More information about the openssl-commits
mailing list