Skip to content

Commit

Permalink
fix bug for 64-bit Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Mar 25, 2019
1 parent 7301c03 commit 5343065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/libzip/lib/zopen.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ zip_open(const char *fn, int flags, int *zep)
clearerr(fp);
fseek(fp, 0, SEEK_END);
len = ftell(fp);
i = fseek(fp, -(len < CDBUFSIZE ? len : CDBUFSIZE), SEEK_END);
i = fseek(fp, -(long)(len < CDBUFSIZE ? len : CDBUFSIZE), SEEK_END);
if (i == -1 && errno != EFBIG) {
/* seek before start of file on my machine */
set_error(zep, NULL, ZIP_ER_SEEK);
Expand Down Expand Up @@ -297,7 +297,7 @@ _zip_readcdir(FILE *fp, unsigned char *buf, unsigned char *eocd, int buflen,
/* go to start of cdir and read it entry by entry */
bufp = NULL;
clearerr(fp);
fseek(fp, -(cd->size+cd->comment_len+EOCDLEN), SEEK_END);
fseek(fp, -(long)(cd->size+cd->comment_len+EOCDLEN), SEEK_END);
if (ferror(fp) || (ftell(fp) != cd->offset)) {
/* seek error or offset of cdir wrong */
if (ferror(fp))
Expand Down

0 comments on commit 5343065

Please sign in to comment.