mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-08 10:09:54 +00:00
Fixed potential overflow in certificate size in ssl_write_certificate()
This commit is contained in:
parent
78e819698b
commit
d83584e9aa
|
@ -11,6 +11,8 @@ Bugfix
|
|||
* Fixed x509_crt_parse_path() bug on Windows platforms
|
||||
* Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by
|
||||
TrustInSoft)
|
||||
* Fixed potential overflow in certificate size verification in
|
||||
ssl_write_certificate() (found by TrustInSoft)
|
||||
|
||||
= Version 1.2.10 released 2013-10-07
|
||||
Changes
|
||||
|
|
|
@ -2223,7 +2223,7 @@ int ssl_write_certificate( ssl_context *ssl )
|
|||
while( crt != NULL )
|
||||
{
|
||||
n = crt->raw.len;
|
||||
if( i + 3 + n > SSL_MAX_CONTENT_LEN )
|
||||
if( n > SSL_MAX_CONTENT_LEN - 3 - i )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "certificate too large, %d > %d",
|
||||
i + 3 + n, SSL_MAX_CONTENT_LEN ) );
|
||||
|
|
Loading…
Reference in a new issue