mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-29 11:14:36 +00:00
Additional check to handle BAD SSL_write retry
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3124)
This commit is contained in:
parent
0856e3f167
commit
cbbe9186f3
@ -356,7 +356,8 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len,
|
||||
* promptly send beyond the end of the users buffer ... so we trap and
|
||||
* report the error in a way the user will notice
|
||||
*/
|
||||
if (len < s->rlayer.wnum) {
|
||||
if ((len < s->rlayer.wnum)
|
||||
|| ((wb->left != 0) && (len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) {
|
||||
SSLerr(SSL_F_SSL3_WRITE_BYTES, SSL_R_BAD_LENGTH);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user