diff options
author | Matt Caswell <matt@openssl.org> | 2015-03-06 14:37:17 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-23 15:23:11 +0000 |
commit | 69f682374868ba2b19a8aeada496bf03dbb037cf (patch) | |
tree | 1c7717928dc7eecd832f2c864ff19c63af708ffc /ssl/d1_both.c | |
parent | 4bcdb4a6019e57b3de077b17940e18befe745531 (diff) |
Fix missing return value checks
Ensure that all functions have their return values checked where
appropriate. This covers all functions defined and called from within
libssl.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index a7d0a82085..22626f1f0b 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -989,7 +989,10 @@ int dtls1_send_change_cipher_spec(SSL *s, int a, int b) s->d1->handshake_write_seq, 0, 0); /* buffer the message to handle re-xmits */ - dtls1_buffer_message(s, 1); + if(!dtls1_buffer_message(s, 1)) { + SSLerr(SSL_F_DTLS1_SEND_CHANGE_CIPHER_SPEC, ERR_R_INTERNAL_ERROR); + return -1; + } s->state = b; } @@ -1237,7 +1240,7 @@ void dtls1_clear_record_buffer(SSL *s) } } -unsigned char *dtls1_set_message_header(SSL *s, unsigned char *p, +void dtls1_set_message_header(SSL *s, unsigned char *p, unsigned char mt, unsigned long len, unsigned long frag_off, unsigned long frag_len) @@ -1250,8 +1253,6 @@ unsigned char *dtls1_set_message_header(SSL *s, unsigned char *p, dtls1_set_message_header_int(s, mt, len, s->d1->handshake_write_seq, frag_off, frag_len); - - return p += DTLS1_HM_HEADER_LENGTH; } /* don't actually do the writing, wait till the MTU has been retrieved */ |