Anti-virus security warning when calling "SetHelpFile( ... )

Anti-virus security warning when calling "SetHelpFile( ... )

Postby ClaudeBrulotte » Wed Sep 08, 2010 3:06 am

Hi,

My anti-virus (ZoneAlarm, version 9.3, the latest...) is giving me a serious security warning when the SET HELPFILE function is called.

Image of the warning:
Image

I was able to isolate the call of the security warning by inserting a MsgInfo() before and after the call to SET HELPFILE TO.

I am getting the error in my application and don't want my users to stress with this.

The problem can be reproduce with one of the FWH samples (fwh\samples\testhlp2.prg)
1) Modify the file fwh\samples\testhlp2.prg and replace CurDrive() with HB_CurDrive()
2) Add some MsgInfo() before and after the SET HELPFILE TO "fwcmd.chm" line (See code example)
3) Compile and start the application ( BUILDH testhlp2 )

The message does appear with my ZoneAlarm, but I do not have any kind of warning on my daughter's PC who is using avast! anti-virus.

Code: Select all  Expand view

function Main()

   SetKey( K_F1, { | nKey | MsgInfo( "Help" ) } )

#ifdef __HARBOUR__

MsgInfo("Before SET HELPFILE TO")
   SET HELPFILE TO "fwcmd.chm"      // Here you set your default HELP file
MsgInfo("After SET HELPFILE TO")
   HelpSetTopic(  "winhelp" )
#else

   SET HELPFILE TO "fwfun.hlp"

#endif

 


Any help or comments would be really appreciated.....

My configuration:
Windows 7 32 bit
FWH 10.8
Harbour 2.1
BCC55


Claude.
ClaudeBrulotte
 
Posts: 3
Joined: Tue Sep 07, 2010 6:25 am

Re: Anti-virus security warning when calling "SetHelpFile( ... )

Postby Antonio Linares » Wed Sep 08, 2010 7:44 am

Claude,

Many thanks for your feedback,

We are reviewing it to find what may be the reason for the anti-virus alert.

Also we have detected some typos in source\winapi\help32.prg. These are the required changes:
Code: Select all  Expand view
static function IsHelpFile( cHelpFile )

   local lReturn := .T.

   do case
      case empty( cHelpFile )
             MsgStop( "No Help file defined with SetHelpFile()!", " Attention" )
             lReturn := .F.
             
      case ! file( cHelpfile )
             MsgStop( "Help file '" + cHelpfile + "' does not exist" + CRLF + ;
                      "or its name (with path) is too long!", " Attention" )
             lReturn := .F.
   endcase

return lReturn
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41410
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Anti-virus security warning when calling "SetHelpFile( ... )

Postby Antonio Linares » Wed Sep 08, 2010 7:56 am

Claude,

In source\winapi\help.c could you please comment out these lines:
Code: Select all  Expand view
static void SetF1Menu( void )
{
   FARPROC lpF1Hook;

   if( ! Hook &&
       ( lpF1Hook = ( FARPROC ) MakeProcInstance( ( FARPROC ) TrapF1, GetInstance() ) ) )
   {
      // Hook = SetWindowsHookEx( WH_MSGFILTER, ( HOOKPROC ) lpF1Hook,
      //                          GetInstance(), 0 );
   }
}
 

and compile it and link the resulting OBJ to your application and check if that cures the antivirus alarm ? thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41410
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Anti-virus security warning when calling "SetHelpFile( ... )

Postby ClaudeBrulotte » Wed Sep 08, 2010 8:38 am

Hi Antonio,

Many thanks for the quick reply.

I did both changes (help32.prg and help.c).

When I compile, i get the following warning:
Code: Select all  Expand view

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
help.c:
Warning W8060 help.c 108: Possibly incorrect assignment in function SetF1Menu
Warning W8004 help.c 117: 'lpF1Hook' is assigned a value that is never used in function SetF1Menu
 


The good news is that I don't have the security warning from ZoneAlarm anymore and the "Help" seems to work fine.
Should I worry about those warnings ?

Thanks!

Claude.
ClaudeBrulotte
 
Posts: 3
Joined: Tue Sep 07, 2010 6:25 am

Re: Anti-virus security warning when calling "SetHelpFile( ... )

Postby Antonio Linares » Wed Sep 08, 2010 8:45 am

Claude,

You can safely ignore those warnings. No problem at all with them :-)

Many thanks for your feedback!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41410
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Anti-virus security warning when calling "SetHelpFile( ... )

Postby ClaudeBrulotte » Wed Sep 08, 2010 4:49 pm

Cool !

Thanks again.
ClaudeBrulotte
 
Posts: 3
Joined: Tue Sep 07, 2010 6:25 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests