Fix case where final special char exceeds buffer
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
parent
fd8cfe4f8e
commit
9b0e940135
2 changed files with 5 additions and 1 deletions
|
@ -785,7 +785,7 @@ int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn )
|
|||
if( c && strchr( ",=+<>#;\"\\", c ) )
|
||||
{
|
||||
if( j + 1 >= sizeof( s ) - 1 )
|
||||
continue;
|
||||
return( MBEDTLS_ERR_X509_BUFFER_TOO_SMALL );
|
||||
s[j++] = '\\';
|
||||
}
|
||||
if( c < 32 || c >= 127 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue