WordPress.org

Make WordPress Core

Ticket #52018: 52018-1.patch

File 52018-1.patch, 966 bytes (added by fierevere, 12 months ago)

https://github.com/WordPress/wordpress-develop/pull/817/commits/1ab4969bbdf3d8d173fe8ff28c515cbee019895e

  • class-pclzip.php

    old new  
    42094209        if ($p_entry['compression'] == 0) {
    42104210
    42114211          // ----- Reading the file
    4212           $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
     4212          if ($p_entry['compressed_size'] > 0) {
     4213            $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
     4214          } else {
     4215            $p_string = false;
     4216          }
    42134217        }
    42144218        else {
    42154219
    42164220          // ----- Reading the file
    4217           $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
     4221          if ($p_entry['compressed_size'] > 0) {
     4222            $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
     4223          } else {
     4224            $v_data = false;
     4225          }
    42184226
    42194227          // ----- Decompress the file
    42204228          if (($p_string = @gzinflate($v_data)) === FALSE) {