summaryrefslogtreecommitdiffstats
path: root/ssl/record
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-05-22 12:36:11 +0100
committerMatt Caswell <matt@openssl.org>2017-05-22 14:00:52 +0100
commit42bd7a16d020de40ad166336fe60409aa9256f9b (patch)
tree230473a79fb30a8a62f2bd0be02cf1ec525ef4e6 /ssl/record
parentb77f3ed17134fe6bf99d143abb1aec3f2bfac555 (diff)
Add an error to the stack on failure in dtls1_write_bytes()
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3496)
Diffstat (limited to 'ssl/record')
-rw-r--r--ssl/record/rec_layer_d1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index 9f80050f01..83f40943f3 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -732,8 +732,10 @@ int dtls1_write_bytes(SSL *s, int type, const void *buf, size_t len,
{
int i;
- if (!ossl_assert(len <= SSL3_RT_MAX_PLAIN_LENGTH))
+ if (!ossl_assert(len <= SSL3_RT_MAX_PLAIN_LENGTH)) {
+ SSLerr(SSL_F_DTLS1_WRITE_BYTES, ERR_R_INTERNAL_ERROR);
return -1;
+ }
s->rwstate = SSL_NOTHING;
i = do_dtls1_write(s, type, buf, len, 0, written);
return i;