diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c2060c3cdc..272a704895 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,13 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-11-02 13:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbexprb.c + ! fixed possible GPF/internal memory corruption in code like: + ? HB_I18N_GETTEXT_NOOP( "Ala ma kota" + " !!!" ) + Mindaugas, the fix is also the answer for the question you left + in TODO. + 2008-11-02 12:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/dynlibhb.c * forced casting in OS2 builds to eliminate problems with possible diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index ff446b11d4..46e1fc4bd8 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -1861,7 +1861,7 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) /* hb_i18n_gettext_noop() is not a real function. It is used to force writing of string to .pot file. So, we should try to - replaced function call by first argument regardless fI18n flag + replace function call by first argument regardless fI18n flag and warnings. */ if( usCount ) @@ -1871,8 +1871,8 @@ static HB_EXPR_FUNC( hb_compExprUseFunCall ) HB_COMP_EXPR_FREE( pParms ); HB_COMP_EXPR_FREE( pSelf->value.asFunCall.pFunName ); memcpy( pSelf, pArg, sizeof( HB_EXPR ) ); - /* TODO: Why do we need to free this? It is used instead of pSelf. */ - HB_COMP_EXPR_FREE( pArg ); + /* free pArg expression body but without freeing its subexpressions */ + HB_COMP_EXPR_CLEAR( pArg ); } } }