On Sun, 02 Apr 2006 11:12:02 +1000
Alch <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> The latest scanners.c, rev1.175 in anonymous CVS includes a patch for 

The latest rev is 1.176.

> if() parentheses  for RAR-SFX and ZIP-SFX however 2 other entries in 
> cli_magic_scandesc() were omitted. I noticed sf.net CVS has been down 
> lately so it may be attributed to that.
> 
> However after applying the full if((ret = cli_scandesc(desc, ctx, 0, 0, 
> NULL)) == CL_VIRUS)  patch I started noticing a lot of "Unknown Error" 
> entires in the logs which I think are caused by this code omitting ret 
> assignement in cli_scanraw():
>         case CL_TYPE_HTML:
>         if(SCAN_HTML && type == CL_TYPE_UNKNOWN_TEXT)
>             if(cli_scanhtml(desc, ctx) == CL_VIRUS)
>             return CL_VIRUS;
> 
> ret is a filetype before a call to cli_scanhtml and type is returned 
> instead of the cli_scanhtml code if there is no virus.

Hmmmm.... Starting with rev 1.174:

Wed Mar 29 15:45:03 CEST 2006 (tk)
----------------------------------
  * libclamav/scanners.c: properly report archive unpacking errors
                          Problem spotted by David F. Skoll
                          <dfs*roaringpenguin.com>

the return value of the second cli_scanraw() call (the one called under
normal circumstances) is ignored so you should not experience the problem of
unknown errors.

> Patch with incorrect  if() parentheses fix in cli_magic_scandesc() and 
> ret assignment in cli_scanraw() attached.

The patch was incorrect (it could break recursion limit balance for mail
files, the current code in cli_scanraw() should be more clear about that,
though). But you're right cli_scanraw() should not return type values and
I will address that when cvs.sf.net is back.

-- 
   oo    .....         Tomasz Kojm <[EMAIL PROTECTED]>
  (\/)\.........         http://www.ClamAV.net/gpg/tkojm.gpg
     \..........._         0DCA5A08407D5288279DB43454822DC8985A444B
       //\   /\              Sun Apr  2 12:31:44 CEST 2006

Attachment: signature.asc
Description: PGP signature

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html

Reply via email to