Address user reported coverity issues.

This commit is contained in:
Janos Follath 2016-05-31 14:03:54 +01:00 committed by Simon Butcher
parent f991128d40
commit 98e28a74e3
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 );