1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Implement max_frag_len write restriction

This commit is contained in:
Manuel Pégourié-Gonnard
2013-07-16 15:43:17 +02:00
parent 0df6b1f068
commit 787b658bb3
2 changed files with 16 additions and 10 deletions

View File

@ -3416,8 +3416,8 @@ int ssl_write( ssl_context *ssl, const unsigned char *buf, size_t len )
}
}
n = ( len < SSL_MAX_CONTENT_LEN )
? len : SSL_MAX_CONTENT_LEN;
n = ( len < ssl->max_frag_len )
? len : ssl->max_frag_len;
if( ssl->out_left != 0 )
{