WordPress.org

Make WordPress Core

Changeset 7314


Ignore:
Timestamp:
03/15/2008 06:33:16 PM (13 years ago)
Author:
westi
Message:

Chase down some 64bit dragons. Ensure that we only ever create a 32bit number to compare to the 32bit magic number when searching a zip file for the end of the directory record. See #6236.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-pclzip.php

    r7130 r7314  
    44714471
    44724472        // -----  Add the byte
    4473         $v_bytes = ($v_bytes << 8) | Ord($v_byte);
     4473        // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number
     4474        // Otherwise on systems where we have 64bit integers the check below for the magic number will fail.
     4475        $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte);
    44744476
    44754477        // ----- Compare the bytes
Note: See TracChangeset for help on using the changeset viewer.