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.
This commit is contained in:
Przemyslaw Czerpak
2010-05-15 18:02:33 +00:00
parent 948023ab13
commit b5bf98ef0f
2 changed files with 7 additions and 1 deletions

View File

@@ -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

View File

@@ -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 );