Hi Pierluigi,

Had a quick look at an older version of the code. It probably has not changed too much.

To loop as described, it means that fseek() and ftell() are not working properly in libclamav/cvd.c.

Just looking at the definitions of the types, there may be an issue with 'size' and 'pad' not getting properly passed to fseek().

Try changing the fseek() at the bottom of the loop to cast 'sise' to long before adding pad in the fseek() call and see what happens. e.g.

   fseek(dbio->fs, (long)size + pad, SEEK_CUR);

Also change the code to check the value returned by fseek(). It should be returning 0.

If the cast works then it would be a good idea to try and make 'size' and 'pad' 'unsigned long' instead of 'unsigned int'.

Hope this helps.

Regards
        Mark.

On 21/03/2020 13:41, Pierluigi Frullani via clamav-users wrote:
I've tried to understand better where is stuck.

The problem is in cli_tgzload ( and that was the easy part ):

during the while loop I see that it continuously loop on:

LibClamAV debug: cli_tgzload: Loading COPYING, size: 17992
LibClamAV debug: cli_tgzload: Loading COPYING, size: 17992

Any idea ?


On Fri, Mar 20, 2020 at 5:45 PM Pierluigi Frullani <pierluigi.frull...@gmail.com <mailto:pierluigi.frull...@gmail.com>> wrote:

    Hi all,
      I've managed to compile clamav 0.102.2 on solaris 10.

    clamd and clamav-milter are able to start, but if I run a freshclam
    ( to get new database definition ) it starts downloading several
    files and then it remain stuck on:

    LibClamAV debug: Initialized 0.102.2 engine
    LibClamAV debug: in cli_cvdload()
    LibClamAV debug: MD5(.tar.gz) = ca37a0074e1887418b1d8fa203f920f3
    LibClamAV debug: cli_versig: Decoded signature:
    ca37a0074e1887418b1d8fa203f920f3
    LibClamAV debug: cli_versig: Digital signature is correct.
    LibClamAV debug: in cli_tgzload()

    for ever.

    By trussing the process it seems that it is in an endless loop:
    19866:  llseek(4, 512, SEEK_SET)                        = 512
    19866:  read(4, "1F8B\b\0\0\0\0\00203ECBD".., 8192)     = 8192
    19866:  llseek(4, 512, SEEK_SET)                        = 512
    19866:  read(4, "1F8B\b\0\0\0\0\00203ECBD".., 8192)     = 8192
    19866:  llseek(4, 512, SEEK_SET)                        = 512
    19866:  read(4, "1F8B\b\0\0\0\0\00203ECBD".., 8192)     = 8192

    ( and repeat this forever ).

    Any idea ?

    thx

    Pierluigi



_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml


_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to