From 31f4547614a8db13d2dfe06be824068b3c400e2a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 11 Feb 2011 18:27:27 +0000 Subject: [PATCH] 2011-02-11 19:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/base64d.c ! Err... --- harbour/ChangeLog | 4 ++++ harbour/src/rtl/base64d.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 948e7ca69f..0fe31cc58b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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. diff --git a/harbour/src/rtl/base64d.c b/harbour/src/rtl/base64d.c index eebc15e6da..2dcbaa9d19 100644 --- a/harbour/src/rtl/base64d.c +++ b/harbour/src/rtl/base64d.c @@ -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 );