From b8f523350f75d3b87de5d92c56caec90e54f947e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Wed, 5 Feb 2014 19:39:07 +0100 Subject: [PATCH] 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() It fixes #41 issue. --- ChangeLog.txt | 5 +++++ contrib/hbct/ctwin.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index f6133c3a32..4886c68b39 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +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() + It fixes #41 issue. + 2014-02-03 23:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbmzip/3rd/minizip/* * updated MINIZIP library 1.2.7 -> 1.2.8 diff --git a/contrib/hbct/ctwin.c b/contrib/hbct/ctwin.c index bbdc3b5823..d3948f5886 100644 --- a/contrib/hbct/ctwin.c +++ b/contrib/hbct/ctwin.c @@ -2114,9 +2114,8 @@ static int hb_ctw_gt_Alert( PHB_GT pGT, PHB_ITEM pMessage, PHB_ITEM pOptions, HB_TRACE( HB_TR_DEBUG, ( "hb_ctw_gt_Alert(%p,%p,%p,%d,%d,%f)", pGT, pMessage, pOptions, iClrNorm, iClrHigh, dDelay ) ); - iOptions = ( int ) hb_arrayLen( pOptions ); - - if( HB_IS_STRING( pMessage ) && iOptions > 0 ) + if( pMessage && HB_IS_STRING( pMessage ) && + pOptions && ( iOptions = ( int ) hb_arrayLen( pOptions ) ) > 0 ) { int iRows, iCols; HB_BOOL fScreen;