Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-05-06 04:17:53 +0300
committerAdam Langley <agl@google.com>2016-05-06 20:38:33 +0300
commit2730955e7449989bb982092d3301f89340dbc189 (patch)
tree8c9d3b17acfa2449420a8e0fc42370bb0684e39a /ssl/d1_both.c
parent30152fdfc116d9ef328661b59a306d6b591243af (diff)
Check BIO_flush return value.
That we're ignoring the return value is clearly wrong when dtls1_retransmit_message has other code that doesn't ignore it, by way of dtls1_do_handshake_write. Change-Id: Ie3f8c0defdf1f5e709d67af4ca6fa4f0d83c76c9 Reviewed-on: https://boringssl-review.googlesource.com/7872 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r--ssl/d1_both.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 7bd28241..e14eae73 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -759,10 +759,11 @@ int dtls1_retransmit_buffered_messages(SSL *ssl) {
}
}
- /* TODO(davidben): Check return value? */
- (void)BIO_flush(SSL_get_wbio(ssl));
-
- ret = 1;
+ ret = BIO_flush(SSL_get_wbio(ssl));
+ if (ret <= 0) {
+ ssl->rwstate = SSL_WRITING;
+ goto err;
+ }
err:
if (!was_buffered) {