summaryrefslogtreecommitdiffstats
path: root/src/fidentify.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-10-04 18:09:48 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2014-10-04 18:09:48 +0200
commitc28950032981dafb83ec5c568a16e030c4467226 (patch)
tree05156e7f64df839808af64cd455c8b864a1eda18 /src/fidentify.c
parent4c5fcd4164b7fd06eafa54fa44ecfb9fb2d02d00 (diff)
Use fseeko() instead of fseek().
Fix 2GB per file limit on Windows for some file types.
Diffstat (limited to 'src/fidentify.c')
-rw-r--r--src/fidentify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fidentify.c b/src/fidentify.c
index 3fadf8b..41f17e2 100644
--- a/src/fidentify.c
+++ b/src/fidentify.c
@@ -113,7 +113,11 @@ static int file_identify(const char *filename, const unsigned int check)
if(check > 0 && file_recovery_new.file_check!=NULL)
{
file_recovery_new.handle=file;
+#ifdef HAVE_FSEEKO
+ fseeko(file_recovery_new.handle, 0, SEEK_END);
+#else
fseek(file_recovery_new.handle, 0, SEEK_END);
+#endif
#ifdef HAVE_FTELLO
file_recovery_new.file_size=ftello(file_recovery_new.handle);
#else