2012-01-31 00:56 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/contrib/gtwvg/wvgwin.c
! added workaround for possible HVM string corruption and GPF in
WVG_SENDMESSAGE() function. This function is still very danger
when it's used with messages extracting data to passed buffer
and user have to pass string large enough to avoid possible
buffer overflow.
This commit is contained in:
@@ -16,6 +16,14 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-01-31 00:56 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/contrib/gtwvg/wvgwin.c
|
||||
! added workaround for possible HVM string corruption and GPF in
|
||||
WVG_SENDMESSAGE() function. This function is still very danger
|
||||
when it's used with messages extracting data to passed buffer
|
||||
and user have to pass string large enough to avoid possible
|
||||
buffer overflow.
|
||||
|
||||
2012-01-31 00:37 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/contrib/gtwvg/wvgwin.c
|
||||
! fixed wrongly used string handler instead of string pointer as
|
||||
|
||||
@@ -125,7 +125,11 @@ static HINSTANCE wvg_hInstance( void )
|
||||
HB_FUNC( WVG_SENDMESSAGE )
|
||||
{
|
||||
void * hText = NULL;
|
||||
LPTSTR lpText = HB_PARSTR( 4, &hText, NULL );
|
||||
HB_SIZE nLen = 0;
|
||||
LPCTSTR lpText = HB_PARSTR( 4, &hText, &nLen );
|
||||
|
||||
if( lpText && HB_ISBYREF( 4 ) )
|
||||
lpText = HB_STRUNSHARE( &hText, lpText, nLen );
|
||||
|
||||
hb_retnl( ( HB_ULONG ) SendMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ),
|
||||
( UINT ) hb_parni( 2 ),
|
||||
|
||||
Reference in New Issue
Block a user