From d2ad59df668ecead60a5153ba48c08ccb992546b Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 9 Feb 2011 20:23:43 +0000 Subject: [PATCH] 2011-02-09 21:23 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbwin/axcore.c ! fixed double binding of ax event handler with two different OLE pointer items - it was causing accessing freed or reused by other things memory potentially with all possible bad side effect. Mindaugas, please verify me but I think that you forgot to remove the old binding when you were adding the code I proposed and you didn't leave it intentionally. Am I right? --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/hbwin/axcore.c | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0e69573168..450c9b07b4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-09 21:23 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbwin/axcore.c + ! fixed double binding of ax event handler with two different + OLE pointer items - it was causing accessing freed or reused + by other things memory potentially with all possible bad side + effect. + Mindaugas, please verify me but I think that you forgot to remove + the old binding when you were adding the code I proposed and you + didn't leave it intentionally. Am I right? + 2011-02-09 16:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbmysql/hbmysql.hbc * contrib/hbct/hbct.hbc diff --git a/harbour/contrib/hbwin/axcore.c b/harbour/contrib/hbwin/axcore.c index a191267b5c..694a68607c 100644 --- a/harbour/contrib/hbwin/axcore.c +++ b/harbour/contrib/hbwin/axcore.c @@ -655,8 +655,6 @@ HB_FUNC( __AXREGISTERHANDLER ) /* ( pDisp, bHandler [, cIID] ) --> pSink */ pSink->lpVtbl = ( IDispatchVtbl * ) &ISink_Vtbl; pSink->count = 0; pSink->pItemHandler = hb_itemNew( pItemBlock ); - hb_oleItemSetCallBack( hb_param( 1, HB_IT_POINTER ), - &pSink->pItemHandler ); pSink->rriid = rriid; pSink->uiClass = 0; lOleError = HB_VTBL( pCP )->Advise( HB_THIS_( pCP ) ( IUnknown* ) pSink, &dwCookie );