summaryrefslogtreecommitdiffstats
path: root/src/file_hdf.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/file_hdf.c
parent4c5fcd4164b7fd06eafa54fa44ecfb9fb2d02d00 (diff)
Use fseeko() instead of fseek().
Fix 2GB per file limit on Windows for some file types.
Diffstat (limited to 'src/file_hdf.c')
-rw-r--r--src/file_hdf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/file_hdf.c b/src/file_hdf.c
index f835140..a557667 100644
--- a/src/file_hdf.c
+++ b/src/file_hdf.c
@@ -74,7 +74,12 @@ static void file_check_hdf(file_recovery_t *file_recovery)
struct ddh_struct ddh;
const struct dd_struct *p;
unsigned int i;
- if(fseek(file_recovery->handle, offset, SEEK_SET) < 0 ||
+ if(
+#ifdef HAVE_FSEEKO
+ fseeko(file_recovery->handle, offset, SEEK_SET) < 0 ||
+#else
+ fseek(file_recovery->handle, offset, SEEK_SET) < 0 ||
+#endif
fread(&ddh, sizeof(ddh), 1, file_recovery->handle) !=1 ||
be16(ddh.size)==0 ||
fread(dd, sizeof(struct dd_struct)*be16(ddh.size), 1, file_recovery->handle) !=1)