Address user reported coverity issues.

This commit is contained in:
Janos Follath 2016-05-31 14:03:54 +01:00
parent 9fa2e86d93
commit dc7b15c11f
17 changed files with 81 additions and 41 deletions

View file

@ -97,7 +97,7 @@ int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen,
n *= 4;
if( dlen < n + 1 )
if( ( dlen < n + 1 ) || ( NULL == dst ) )
{
*olen = n + 1;
return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL );