|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patch 61566.diff for *Directory/Filesystem functions Bug #61566Patch version 2012-03-31 10:02 UTC Return to Bug #61566 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions:
Developer: ab@php.net
diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c
index 1f0f63b..849375e 100644
--- a/ext/fileinfo/libmagic/cdf.c
+++ b/ext/fileinfo/libmagic/cdf.c
@@ -298,7 +298,14 @@ cdf_read(const cdf_info_t *info, off_t off, void *buf, size_t len)
return -1;
}
+#if PHP_API_VERSION < 20100412 && defined PHP_WIN32
+ if (info->i_buf != NULL) {
+ if (info->i_len < siz) {
+ len = info->i_len;
+ }
+#else
if (info->i_buf != NULL && info->i_len >= siz) {
+#endif
(void)memcpy(buf, &info->i_buf[off], len);
return (ssize_t)len;
}
|
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 05:00:01 2025 UTC |