Fix base64_decode() to return and check length correctly

This commit is contained in:
Paul Bakker 2014-07-04 13:50:31 +02:00
parent 31855456f9
commit d598318661
4 changed files with 69 additions and 0 deletions

View file

@ -172,6 +172,7 @@ int base64_decode( unsigned char *dst, size_t *dlen,
return( 0 );
n = ( ( n * 6 ) + 7 ) >> 3;
n -= j;
if( dst == NULL || *dlen < n )
{