From 7c5a4b18a3ceed54e2963342865604ff00e22244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 6 Feb 2014 15:33:40 +0100 Subject: [PATCH] 2014-02-06 15:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rdd/hsx/hsx.c ! fixed hs_Version() - it wrongly used hb_xstrcat() instead of hb_xstrcpy() and last NULL parameter was missed. * src/rdd/usrrdd/usrrdd.c ! fixed GPF when wrong parameters are passed to UR_SUPER_*() functions (issue #44) --- ChangeLog.txt | 9 +++++++++ src/rdd/hsx/hsx.c | 2 +- src/rdd/usrrdd/usrrdd.c | 10 +++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4886c68b39..7751ffb3fd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,15 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-02-06 15:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rdd/hsx/hsx.c + ! fixed hs_Version() - it wrongly used hb_xstrcat() instead of + hb_xstrcpy() and last NULL parameter was missed. + + * src/rdd/usrrdd/usrrdd.c + ! fixed GPF when wrong parameters are passed to UR_SUPER_*() + functions (issue #44) + 2014-02-05 19:39 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbct/ctwin.c ! added protection against wrong parameters passed to hb_gtAllert() diff --git a/src/rdd/hsx/hsx.c b/src/rdd/hsx/hsx.c index 01064b09ce..1fc7606518 100644 --- a/src/rdd/hsx/hsx.c +++ b/src/rdd/hsx/hsx.c @@ -2020,7 +2020,7 @@ HB_FUNC( HS_VERSION ) char * pszHBVersion, * pszVersion; pszHBVersion = hb_verHarbour(); - pszVersion = hb_xstrcat( NULL, szVer, ": ", pszHBVersion ); + pszVersion = hb_xstrcpy( NULL, szVer, ": ", pszHBVersion, NULL ); hb_retclen_buffer( pszVersion, strlen( pszVersion ) ); hb_xfree( pszHBVersion ); } diff --git a/src/rdd/usrrdd/usrrdd.c b/src/rdd/usrrdd/usrrdd.c index 109abe25f2..a0464cd91e 100644 --- a/src/rdd/usrrdd/usrrdd.c +++ b/src/rdd/usrrdd/usrrdd.c @@ -3078,7 +3078,15 @@ static HB_ERRCODE hb_usrErrorRT( AREAP pArea, HB_ERRCODE errGenCode, HB_ERRCODE hb_errPutGenCode( pError, errGenCode ); hb_errPutSubCode( pError, errSubCode ); hb_errPutDescription( pError, hb_langDGetErrorDesc( errGenCode ) ); - iRet = SELF_ERROR( pArea, pError ); + if( pArea ) + iRet = SELF_ERROR( pArea, pError ); + else + { + hb_errPutSeverity( pError, ES_ERROR ); + hb_errPutSubSystem( pError, "???DRIVER" ); + hb_errPutOperation( pError, HB_ERR_FUNCNAME ); + iRet = hb_errLaunch( pError ); + } hb_errRelease( pError ); } return iRet;