Menu

#7 stat fails for large files

open
big files (1)
5
2016-03-24
2016-03-17
Martin
No

Hi Olivier!

We're using scannedonlyd on our fileserver. After downloading a big DVD image (several GBs), clamav produced to following output and ceased scanning:

scannedonlyd_clamav[1271]: 0: Error during stat(/var/samba/surf/debian-8.3.0-amd64-DVD-1.iso): Value too large for defined data type, not scanning

Unfortunately, i'm no C expert, but the relevant code is in
src/scannedonlyd_clamav.c: line 674

Could you have a look at which data type is to small? Thanks a ton!

Martin

note: Installed version is 0.21, not latest devel version (can't choose other in dropdown list above).

Discussion

  • Olivier Sessink

    Olivier Sessink - 2016-03-21

    add
    #define FILEOFFSETBITS 64
    on line 24 and recompile, that should help (without the quotes)

     
  • Martin

    Martin - 2016-03-22

    Olivier, thanks for the answer but unfortunately that didn't do the trick...

     
    • Olivier Sessink

      Olivier Sessink - 2016-03-23

      I found some other suggestions, try the following define's:

      '#define _GNU_SOURCE'
      '#define FILEOFFSETBITS 64'
      '#define _LARGEFILE64_SOURCE'

      or compile with CFLAGS=-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64

      does that work?
      (the problem is that there are some workarounds needed for very large files on a 32bit system - on a 64bit system this is not a problem)

       
  • Martin

    Martin - 2016-03-24

    Hi Olivier!

    Thanks for the suggestion. That also didn't work out.
    Anyway - we will upgrade our fileserver to a x64 system soon. This should solve the problem.

    Martin

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.