2022-11-11 21:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
! use hb_vmPushString() instead of hb_vmPushStringPcode()
hb_vmPushStringPcode() is only for static buffer which cannot be freed.
Variables passed to PRG debug functions can be stored by PRG code in
other variables which lives longer then passed buffer and later cause
GPF when curls structure is freed.
! indenting
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
Entries may not always be in chronological/commit order.
|
||||
See license at the end of file. */
|
||||
|
||||
2022-11-11 21:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbcurl/core.c
|
||||
! use hb_vmPushString() instead of hb_vmPushStringPcode()
|
||||
hb_vmPushStringPcode() is only for static buffer which cannot be freed.
|
||||
Variables passed to PRG debug functions can be stored by PRG code in
|
||||
other variables which lives longer then passed buffer and later cause
|
||||
GPF when curls structure is freed.
|
||||
! indenting
|
||||
|
||||
2022-11-11 20:47 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbapi.h
|
||||
* src/common/hbver.c
|
||||
|
||||
@@ -408,9 +408,10 @@ static int hb_curl_progress_callback( void * Cargo, double dltotal, double dlnow
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hb_curl_debug_callback(CURL *handle, curl_infotype type, char *data, size_t size, void *Cargo)
|
||||
static int hb_curl_debug_callback( CURL * handle, curl_infotype type, char * data, size_t size, void * Cargo )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( handle );
|
||||
|
||||
if( Cargo )
|
||||
{
|
||||
PHB_CURL hb_curl = ( PHB_CURL ) Cargo;
|
||||
@@ -419,7 +420,7 @@ static int hb_curl_debug_callback(CURL *handle, curl_infotype type, char *data,
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( hb_curl->pDebugCallback );
|
||||
hb_vmPushInteger( type );
|
||||
hb_vmPushStringPcode( data, size);
|
||||
hb_vmPushString( data, size );
|
||||
hb_vmSend( 2 );
|
||||
|
||||
hb_vmRequestRestore();
|
||||
|
||||
Reference in New Issue
Block a user