diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8c0019d794..607569c7db 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,12 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-15 20:02 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbwin/olecore.c + ! added protection against possible buffer overflow when more then + 32 parameters is passed by reference from foreign code - thank to + Mindaugas for locating the problem. + 2010-05-15 17:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * harbour.spec * contrib/Makefile diff --git a/harbour/contrib/hbwin/olecore.c b/harbour/contrib/hbwin/olecore.c index 2be2832502..c820ec5f42 100644 --- a/harbour/contrib/hbwin/olecore.c +++ b/harbour/contrib/hbwin/olecore.c @@ -1088,7 +1088,7 @@ HB_BOOL hb_oleDispInvoke( PHB_SYMB pSym, PHB_ITEM pObject, DISPID* pDispId, for( i = 1, ii = 0; i <= iCount; i++ ) { - if( pParams->rgvarg[ iCount - i ].n1.n2.vt & VT_BYREF ) + if( pParams->rgvarg[ iCount - i ].n1.n2.vt & VT_BYREF && ii < iRefs ) { refArray[ ii ].variant = &pParams->rgvarg[ iCount - i ]; hb_oleVariantToItem( refArray[ ii ].item, refArray[ ii ].variant );