diff --git a/ChangeLog b/ChangeLog index 03c7e31c2..ded66e662 100644 --- a/ChangeLog +++ b/ChangeLog @@ -67,6 +67,8 @@ Bugfix * Use \n\t rather than semicolons for bn_mul asm, since some assemblers interpret semicolons as comment delimiters (found by Barry K. Nathan). * Disable broken Sparc64 bn_mul assembly (found by Florian Obser). + * Fix base64_decode() to return and check length correctly (in case of + tight buffers) = Version 1.2.10 released 2013-10-07 Changes diff --git a/library/base64.c b/library/base64.c index 06305bb5e..1364713d9 100644 --- a/library/base64.c +++ b/library/base64.c @@ -162,6 +162,7 @@ int base64_decode( unsigned char *dst, size_t *dlen, return( 0 ); n = ((n * 6) + 7) >> 3; + n -= j; if( *dlen < n ) {