mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Fix base64_decode() to return and check length correctly
This commit is contained in:
parent
31855456f9
commit
d598318661
4 changed files with 69 additions and 0 deletions
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue