summaryrefslogtreecommitdiffstats
path: root/src/file_png.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_png.c
parent4c5fcd4164b7fd06eafa54fa44ecfb9fb2d02d00 (diff)
Use fseeko() instead of fseek().
Fix 2GB per file limit on Windows for some file types.
Diffstat (limited to 'src/file_png.c')
-rw-r--r--src/file_png.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/file_png.c b/src/file_png.c
index 6b143d3..d3e4ce7 100644
--- a/src/file_png.c
+++ b/src/file_png.c
@@ -110,7 +110,12 @@ static void file_check_png(file_recovery_t *fr)
{
char buffer[8];
const struct png_chunk *chunk=(const struct png_chunk *)&buffer;
- if(fseek(fr->handle, fr->file_size, SEEK_SET) < 0 ||
+ if(
+#ifdef HAVE_FSEEKO
+ fseeko(fr->handle, fr->file_size, SEEK_SET) < 0 ||
+#else
+ fseek(fr->handle, fr->file_size, SEEK_SET) < 0 ||
+#endif
fread(&buffer, sizeof(buffer), 1, fr->handle) != 1)
{
fr->file_size=0;