diff options
Diffstat (limited to 'ext/fileinfo/libmagic/cdf.c')
-rw-r--r-- | ext/fileinfo/libmagic/cdf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c index 93cc231884..45ad6e3e57 100644 --- a/ext/fileinfo/libmagic/cdf.c +++ b/ext/fileinfo/libmagic/cdf.c @@ -291,11 +291,11 @@ cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h, } static ssize_t -cdf_read(const cdf_info_t *info, php_off_t off, void *buf, size_t len) +cdf_read(const cdf_info_t *info, zend_off_t off, void *buf, size_t len) { size_t siz = (size_t)off + len; - if ((php_off_t)(off + len) != (php_off_t)siz) { + if ((zend_off_t)(off + len) != (zend_off_t)siz) { errno = EINVAL; return -1; } @@ -308,7 +308,7 @@ cdf_read(const cdf_info_t *info, php_off_t off, void *buf, size_t len) if (info->i_fd == -1) return -1; - if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (php_off_t)-1) + if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (zend_off_t)-1) return -1; if (FINFO_READ_FUNC(info->i_fd, buf, len) != (ssize_t)len) @@ -323,7 +323,7 @@ cdf_read_header(const cdf_info_t *info, cdf_header_t *h) char buf[512]; (void)memcpy(cdf_bo.s, "\01\02\03\04", 4); - if (cdf_read(info, (php_off_t)0, buf, sizeof(buf)) == -1) + if (cdf_read(info, (zend_off_t)0, buf, sizeof(buf)) == -1) return -1; cdf_unpack_header(h, buf); cdf_swap_header(h); @@ -357,7 +357,7 @@ cdf_read_sector(const cdf_info_t *info, void *buf, size_t offs, size_t len, size_t ss = CDF_SEC_SIZE(h); size_t pos = CDF_SEC_POS(h, id); assert(ss == len); - return cdf_read(info, (php_off_t)pos, ((char *)buf) + offs, len); + return cdf_read(info, (zend_off_t)pos, ((char *)buf) + offs, len); } ssize_t |