lots of race conditions in zlib

Esse commit está contido em:
Paul Tarjan
2013-05-02 21:23:22 -07:00
commit de Sara Golemon
commit 6589da0e87
10 arquivos alterados com 27 adições e 10 exclusões
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@ echo "*** Testing gzopen() : basic functionality ***\n";
// Initialise all required variables
$filename = "temp.txt.gz";
$filename = "gzopen_basic2.gz";
$modes = array('w', 'w+');
$data = "This was the information that was written";
+1 -1
Ver Arquivo
@@ -1,5 +1,5 @@
<?php
$filename = "temp.txt.gz";
$filename = "gzwrite_error.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;
+1 -1
Ver Arquivo
@@ -1,6 +1,6 @@
<?php
$filename = "temp.txt.gz";
$filename = "gzwrite_error2.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
var_dump(gzwrite( $h, $str, 0 ) );
@@ -1,6 +1,6 @@
<?php
$filename = "temp.txt.gz";
$filename = "zlib_wrapper_fflush_basic.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written.";
$length = 10;
@@ -1,6 +1,6 @@
<?php
$f = dirname(__FILE__)."/004.txt.gz";
$f2 = "temp.txt.gz";
$f2 = "zlib_wrapper_ftruncate_basic.gz";
copy($f, $f2);
$h = gzopen($f2, "r");
@@ -1,6 +1,6 @@
<?php
$filename = dirname(__FILE__)."/temp.txt.gz";
$filename = dirname(__FILE__)."/gzeof_variation1.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;
+1 -1
Ver Arquivo
@@ -1,6 +1,6 @@
<?php
$filename = dirname(__FILE__)."/temp.txt.gz";
$filename = dirname(__FILE__)."/gzputs_basic.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;
@@ -1,6 +1,6 @@
<?php
$filename = "temp.txt.gz";
$filename = "gzread_variation1.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
var_dump(gzread($h, 100));
+1 -1
Ver Arquivo
@@ -1,6 +1,6 @@
<?php
$filename = "temp.txt.gz";
$filename = "gzwrite_basic.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;
+18 -1
Ver Arquivo
@@ -501,7 +501,24 @@ def walk(filename, source):
test = test.replace('hash_file_example.txt', 'hash_file_basic_example.txt')
if '/ext-hash/hash_file_error.php' in full_dest_filename:
test = test.replace('hash_file_example.txt', 'hash_file_error_example.txt')
if '/ext-zlib/gzopen_basic2.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzopen_basic2.gz')
if '/ext-zlib/gzwrite_error.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzwrite_error.gz')
if '/ext-zlib/gzwrite_error2.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzwrite_error2.gz')
if '/ext-zlib/zlib_wrapper_fflush_basic.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'zlib_wrapper_fflush_basic.gz')
if '/ext-zlib/zlib_wrapper_ftruncate_basic.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'zlib_wrapper_ftruncate_basic.gz')
if '/ext-zlib/gzeof_variation1.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzeof_variation1.gz')
if '/ext-zlib/gzputs_basic.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzputs_basic.gz')
if '/ext-zlib/gzread_variation1.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzread_variation1.gz')
if '/ext-zlib/gzwrite_basic.php' in full_dest_filename:
test = test.replace('temp.txt.gz', 'gzwrite_basic.gz')
file(full_dest_filename, 'w').write(test)