2011-02-11 19:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/base64d.c
    ! Err...
This commit is contained in:
Viktor Szakats
2011-02-11 18:27:27 +00:00
parent 3aea6dfbdc
commit 31f4547614
2 changed files with 6 additions and 2 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-02-11 19:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/base64d.c
! Err...
2011-02-11 19:24 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/base64d.c
! Fixed TOFIX to handle too large result. Now it will RTE.

View File

@@ -130,11 +130,11 @@ HB_FUNC( HB_BASE64DECODE )
if( nSrcLen > 0 )
{
HB_SIZE nDstLen = ( ( ( nSrcLen * 3 ) / 4 ) + 1 );
HB_SIZE nDstLen = ( ( ( nSrcLen * 3 ) / 4 ) + 1 ) * sizeof( char );
if( nDstLen <= HB_SIZE_MAX )
{
char * code = ( char * ) hb_xgrab( nDstLen * sizeof( char ) );
char * code = ( char * ) hb_xgrab( nDstLen );
nDstLen = base64_decode_block( hb_parcx( 1 ), nSrcLen, code );