View Issue Details

IDProjectCategoryView StatusLast Update
0000435fileGeneralpublic2023-05-22 01:44
Reporterhaowenl Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
OSWindows 
Product Version5.44 
Summary0000435: file_magic: stat fails with errno EOVERFLOW on Windows for large files
DescriptionOn Windows, stat by default calls _stat64i32, which uses 32bit file length types. This causes stat to fail with EOVERFLOW for large files.

This can be fixed by either using _stat64 for all files on Windows, or catch the EOVERFLOW errno and retry with _stat64.
TagsNo tags attached.

Activities

christos

2023-05-21 17:15

manager   ~0003936

does adding:

#ifdef _WIN64
#define stat _stat64
#endif

in file.h fix it?

haowenl

2023-05-22 01:44

reporter   ~0003940

Yes, that seems sufficient. Unfortunately tho, I do not currently have access to a Windows machine and cannot test it.

Issue History

Date Modified Username Field Change
2023-03-22 21:47 haowenl New Issue
2023-05-21 17:15 christos Assigned To => christos
2023-05-21 17:15 christos Status new => assigned
2023-05-21 17:15 christos Status assigned => feedback
2023-05-21 17:15 christos Note Added: 0003936
2023-05-22 01:44 haowenl Note Added: 0003940
2023-05-22 01:44 haowenl Status feedback => assigned