jetwhiz / encfs4win

Windows port of EncFS
https://encfs.win
Other
400 stars 41 forks source link

Crash for file size > 2Gb #75

Closed g-stefan closed 7 years ago

g-stefan commented 7 years ago

Environment

Description

Fatal error for files bigger than 2GB (file size error) Compiled encfs4win 32bit and 64bit version same behavior Compiled using build.bat, for 64 bit some build modification required.

32bit version => sizeof(off_t) = 4 , sizeof(FUSE_OFF_T) = 8 64bit version => sizeof(off_t) = 4 , sizeof(FUSE_OFF_T) = 8

Expected behavior vs. actual behavior

Expected off_t used by encfs4win to be of type FUSE_OFF_T or the same size so will support large file size > 2Gb

Steps to reproduce problem

  1. Download encfs4win v1.10.1-RC10
  2. Mount directory
  3. Copy a file of size > 2Gb ( Windows 10 x64 iso for example) 4.1. 32bit encfs thread will crash/bail out, process remain active, unable to acces mount 4.2. 64bit encfs will be able to acces mount, process remains active, no file copied
g-stefan commented 7 years ago

Changed off_t with FUSE_OFF_T in encfs source code, file copy works as expected for file size >4Gb. Tested with 40Gb random content file, no problem detected, file integrity passed! Encfs4win compiled for 32bit.

sergeevabc commented 7 years ago

@jetwhiz, what’s your take on @g-stefan’s fix?

NilSkilz commented 7 years ago

Is there a compiled version of this fix for 32 bit that could be shared? I'm experiencing the same issue.

g-stefan commented 7 years ago

Here on my repo, 32 and 64 bit versions without setup, just overwrite files in folder: https://github.com/g-stefan/encfs4win/releases

NilSkilz commented 7 years ago

Appreciate that. It resolves the issue for me.

jetwhiz commented 7 years ago

Hi @NilSkilz! Sorry for the long delay -- I moved to a new country at the beginning of the year so things have been hectic. This change looks good (FUSE_OFF_T should have been used here), so I'll try to get this fix incorporated ASAP.