diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-04 16:44:15 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-04 16:44:15 +0000 |
| commit | 7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc (patch) | |
| tree | c6fd23b598f3994eddb18cb1c0f2e8d95ff054fa /wp-admin/includes/class-pclzip.php | |
| parent | f650f48c048bfbbb2ae702b6425d87e39358d748 (diff) | |
| download | wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.gz wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.xz wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.zip | |
Merged with WordPress 2.5, unstable, only for testing
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/includes/class-pclzip.php')
| -rw-r--r-- | wp-admin/includes/class-pclzip.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-admin/includes/class-pclzip.php b/wp-admin/includes/class-pclzip.php index d387f00..b490744 100644 --- a/wp-admin/includes/class-pclzip.php +++ b/wp-admin/includes/class-pclzip.php @@ -4470,7 +4470,9 @@ $v_byte = @fread($this->zip_fd, 1); // ----- Add the byte - $v_bytes = ($v_bytes << 8) | Ord($v_byte); + // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number + // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. + $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); // ----- Compare the bytes if ($v_bytes == 0x504b0506) |
