Language: PHP
Label: vulnerable
CWE: CWE-77 \u2014 Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

Code:
    function privReadEndCentralDirZip64(&$p_central_dir,$cdr_data){
        $this->zip64 = true;        
        //56 [zip64 end of central directory record]  
            //Vzip64_cdr_eof/Pblow_offset/vversion/vversion_un/Vdisk/Vdisk_start/Pdisk_entries/Pentries/Psize/Poffset
        //20 [zip64 end of central directory locator] 
            //Vzip64_cdr_loc_flag/Vdisk_num/Pcdr_offset/Vtotal_disk 
        //22 [end of central directory record]        
            //Vzip_cdr_eof/vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size
        $offset_back = 56+20+22;
        $old_pose = ftell($this->zip_fd);
        fseek($this->zip_fd,$old_pose-$cdr_data['comment_size']-$offset_back);
        $v_bin  = fread($this->zip_fd, 56);
        $v_data  = unpack('Vzip64_cdr_eof/Pblow_offset/vversion/vversion_un/Vdisk/Vdisk_start/Pdisk_entries/Pentries/Psize/Poffset', $v_bin);
        if($v_data['zip64_cdr_eof'] != 0x06064b50){
            PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Zip64 Central Dir Record error:".json_encode($v_data));
            return PclZip::errorCode();
        }
        
        $loc_bin   = fread($this->zip_fd,20);
        $loc_data  = unpack('Vzip64_cdr_loc_flag/Vdisk_num/Pcdr_offset/Vtotal_disk', $loc_bin);
        if($loc_data['zip64_cdr_loc_flag'] != 0x07064b50){
            PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Zip64 central directory locator error:".json_encode($loc_data));
            return PclZip::errorCode();
        }
        $p_central_dir['entries'] = $v_data['entries'];
        $p_central_dir['disk_entries'] = $v_data['disk_entries'];
        $p_central_dir['offset'] = $v_data['offset'];
        $p_central_dir['size'] = $v_data['size'];
        fseek($this->zip_fd,$old_pose);
        return 1;
    }