summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-10-22 17:51:41 +0200
committerGravatar Martin Szulecki2014-10-22 17:51:41 +0200
commit8f01a6ee7f4a0da815c96882a67cc3e83590b3e6 (patch)
treeaf406a0d8a13344d21142e66ecc00e6a946a296c /src/common.c
parent78e100ed92417f978732def92e07c6010ee33ce5 (diff)
downloadidevicerestore-8f01a6ee7f4a0da815c96882a67cc3e83590b3e6.tar.gz
idevicerestore-8f01a6ee7f4a0da815c96882a67cc3e83590b3e6.tar.bz2
common: Use ftello(), fseeko() variants for large file support
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index 5e061eb..6451e07 100644
--- a/src/common.c
+++ b/src/common.c
@@ -160,8 +160,8 @@ int read_file(const char* filename, void** data, size_t* size) {
return -1;
}
- fseek(file, 0, SEEK_END);
- length = ftell(file);
+ fseeko(file, 0, SEEK_END);
+ length = ftello(file);
rewind(file);
buffer = (char*) malloc(length);