summaryrefslogtreecommitdiffstats
path: root/src/ideviceinstaller.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-03-21 15:17:44 +0100
committerGravatar Martin Szulecki2012-03-21 15:17:44 +0100
commitde7da75362b614d32492346b9bb4ca7c3c225505 (patch)
treeb153d5d77cf88fc510e9e46dcc58094cb60806b2 /src/ideviceinstaller.c
parent91320726987b922e507b93bc1dd1df8e118ce6ff (diff)
downloadideviceinstaller-de7da75362b614d32492346b9bb4ca7c3c225505.tar.gz
ideviceinstaller-de7da75362b614d32492346b9bb4ca7c3c225505.tar.bz2
Fix build failure with libzip 0.10
Diffstat (limited to 'src/ideviceinstaller.c')
-rw-r--r--src/ideviceinstaller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 3780979..00a25de 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -163,7 +163,7 @@ static int zip_f_get_contents(struct zip *zf, const char *filename, int locate_f
}
*buffer = malloc(zs.size);
- if (zip_fread(zfile, *buffer, zs.size) != zs.size) {
+ if (zs.size > LLONG_MAX || zip_fread(zfile, *buffer, zs.size) != (zip_int64_t)zs.size) {
fprintf(stderr, "ERROR: zip_fread %" PRIu64 " bytes from '%s'\n", (uint64_t)zs.size, filename);
free(*buffer);
*buffer = NULL;