Commit f0f8d708 authored by Ondrej Sury's avatar Ondrej Sury

Imported Upstream version 5.4.4

parent 90ceaa9e
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.4.4
- COM:
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
14 Jun 2012, PHP 5.4.4
- CLI Server:
. Implemented FR #61977 (Need CLI web-server support for files with .htm &
......@@ -14,17 +11,15 @@ PHP NEWS
. Fixed bug #61546 (functions related to current script failed when chdir()
in cli sapi). (Laruence, reeze.xia@gmail.com)
- CURL:
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
(Laruence)
- COM:
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
- Core:
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
. Fixed CVE-2012-2143. (Solar Designer)
. Fixed bug #62097 (fix for for bug #54547). (Gustavo)
. Fixed bug #62005 (unexpected behavior when incrementally assigning to a
member of a null object). (Laruence)
. Fixed bug #61998 (Using traits with method aliases appears to result in
crash during execution). (Dmitry)
. Fixed bug #61978 (Object recursion not detected for classes that implement
JsonSerializable). (Felipe)
. Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
......@@ -48,47 +43,35 @@ PHP NEWS
set to null). (Anatoliy)
. Changed php://fd to be available only for CLI.
- CURL:
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
(Laruence)
- Intl:
. Fixed bug #62082 (Memory corruption in internal function
get_icu_disp_value_src_php()). (Gustavo)
- PDO:
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
access violations). (Johannes)
- Phar:
. Fix bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus)
- Pgsql:
. Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki)
- Fileinfo
- FPM
. Fixed bug #61812 (Uninitialised value used in libmagic).
(Laruence, Gustavo)
- FPM
. Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat)
. Fixed bug #61835 (php-fpm is not allowed to run as root). (fat)
. Fixed bug #61295 (php-fpm should not fail with commented 'user'
for non-root start). (fat)
. Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm). (fat)
. Fixed bug #61026 (FPM pools can listen on the same address). (fat)
. Fixed bug #62033 (php-fpm exits with status 0 on some failures to start).
(fat)
. Fixed bug #62153 (when using unix sockets, multiples FPM instances
can be launched without errors). (fat)
. Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat)
. Fixed bug #61218 (FPM drops connection while receiving some binary values
in FastCGI requests). (fat)
- Intl
. ResourceBundle constructor now accepts NULL for the first two arguments.
(Gustavo)
. Fixed bug #62082 (Memory corruption in internal function
get_icu_disp_value_src_php()). (Gustavo)
. Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a
directory descriptor under windows. (Anatoliy)
. Fixed bug #61566 failure caused by the posix lseek and read versions
under windows in cdf_read(). (Anatoliy)
- Libxml:
. Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
(Laruence)
- Sockets:
. Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe)
- XML Writer:
. Fixed bug #62064 (memory leak in the XML Writer module).
(jean-pierre dot lozi at lip6 dot fr)
- Zlib:
. Fixed bug #61820 (using ob_gzhandler will complain about headers already
......@@ -674,6 +657,14 @@ PHP NEWS
. Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression).
(Mike)
08 May 2012, PHP 5.3.13
- CGI
. Improve fix for PHP-CGI query string parameter vulnerability, CVE-2012-2311.
(Stas)
03 May 2012, PHP 5.3.12
- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
26 Apr 2012, PHP 5.3.11
- Core:
......
......@@ -37,9 +37,9 @@ PHP 5.4 UPGRADE NOTES
=============================
- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom
are present. If either is available, session.entropy_file now
are present. If either is available, session.entropy_file now
defaults to that file and session.entropy_length defaults to 32.
This provides non-blocking entropy to session id generation. If you
This provides non-blocking entropy to session id generation. If you
do not want extra entropy for your session ids, add:
session.entropy_file=
......@@ -89,9 +89,9 @@ PHP 5.4 UPGRADE NOTES
session.upload_progress.min_freq
- Added a zend.multibyte directive as a replacement of the PHP compile time
configuration option --enable-zend-multibyte. Now the Zend Engine always
configuration option --enable-zend-multibyte. Now the Zend Engine always
contains code for multibyte support, which can be enabled or disabled at
runtime. Note: It doesn't make a lot of sense to enable this option if
runtime. Note: It doesn't make a lot of sense to enable this option if
ext/mbstring is not enabled, because most functionality is implemented by
mbstrings callbacks.
......@@ -107,7 +107,7 @@ PHP 5.4 UPGRADE NOTES
in a stream fashion (through php://input) without having it copied in memory
multiple times.
- Added windows_show_crt_warning. This directive shows the CRT warnings when
- Added windows_show_crt_warning. This directive shows the CRT warnings when
enabled. These warnings were displayed by default until now. It is disabled
by default.
......@@ -162,7 +162,7 @@ PHP 5.4 UPGRADE NOTES
- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now
return false on isset() and true on empty(), and produce warning if
trying to use them. Offsets of types double, bool and null produce
trying to use them. Offsets of types double, bool and null produce
notice. Numeric strings ($a['2']) still work as before.
Note that offsets like '12.3' and '5 and a half' are considered
......@@ -207,7 +207,7 @@ PHP 5.4 UPGRADE NOTES
- htmlentities() and htmlspecialchars() are stricter in the code units they
accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are
rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected,
except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and
0xFF are rejected.
......@@ -233,7 +233,7 @@ PHP 5.4 UPGRADE NOTES
checks on the validity of the entities. Numerical entities are checked for a
valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the
validity of such numerical entity in the target document type is also
checked. Named entities are checked for necessary existence in the target
checked. Named entities are checked for necessary existence in the target
document type instead of only checking whether they were constituted by
alphanumeric characters.
......@@ -341,8 +341,6 @@ PHP 5.4 UPGRADE NOTES
- Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
==============================
5. Changes to existing classes
==============================
......@@ -375,9 +373,6 @@ PHP 5.4 UPGRADE NOTES
- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
the default stream context.
- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two
arguments.
===========================
7. Deprecated Functionality
===========================
......@@ -436,7 +431,7 @@ d. Removed hash algorithms
a. Extensions no longer maintained
- ext/sqlite is no longer part of the base distribution and has been moved
to PECL. Use sqlite3 or PDO_SQLITE instead.
to PECL. Use sqlite3 or PDO_SQLITE instead.
b. Extensions with changed behavior
......@@ -490,7 +485,7 @@ b. Extensions with changed behavior
===========================
- A REQUEST_TIME_FLOAT value returns a floating point number indicating the
time with microsecond precision. All SAPIs providing this value should be
time with microsecond precision. All SAPIs providing this value should be
returning float and not time_t.
- apache_child_terminate(), getallheaders(), apache_request_headers()
......
--TEST--
Bug #61998 (Using traits with method aliases appears to result in crash during execution)
--FILE--
<?php
class Foo {
use T1 {
func as newFunc;
}
public function func() {
echo "From Foo\n";
}
}
trait T1 {
public function func() {
echo "From T1\n";
}
}
class Bar {
public function func() {
echo "From Bar\n";
}
public function func2() {
echo "From Bar\n";
}
public function func3() {
echo "From Bar\n";
}
use T1 {
func as newFunc;
func as func2;
}
use T2 {
func2 as newFunc2;
func2 as newFunc3;
func2 as func3;
}
}
trait T2 {
public function func2() {
echo "From T2\n";
}
}
$f = new Foo();
$f->newFunc(); //from T1
$f->func(); //from Foo
$b = new Bar();
$b->newFunc(); //from T1
$b->func(); //from Bar
$b->func2(); //from Bar
$b->newFunc2(); //from T2
$b->newFunc3(); //from T2
$b->func3(); //from Bar
--EXPECTF--
From T1
From Foo
From T1
From Bar
From Bar
From T2
From T2
From Bar
......@@ -3619,7 +3619,6 @@ ZEND_API void zend_do_implement_trait(zend_class_entry *ce, zend_class_entry *tr
}
}
ce->traits[ce->num_traits++] = trait;
trait->refcount++;
}
}
/* }}} */
......@@ -3871,8 +3870,8 @@ static int zend_traits_copy_functions(zend_function *fn TSRMLS_DC, int num_args,
fn_copy = *fn;
function_add_ref(&fn_copy);
/* this function_name is never destroyed, because its refcount
greater than 1 and classes are always destoyed before the
traits they use */
greater than 1, classes are always destoyed in reverse order
and trait is declared early than this class */
fn_copy.common.function_name = aliases[i]->alias;
/* if it is 0, no modifieres has been changed */
......@@ -4077,14 +4076,14 @@ static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{
size_t i;
/* prepare copies of trait function tables for combination */
function_tables = emalloc(sizeof(HashTable*) * ce->num_traits);
resulting_table = (HashTable *)emalloc(sizeof(HashTable));
function_tables = malloc(sizeof(HashTable*) * ce->num_traits);
resulting_table = (HashTable *) malloc(sizeof(HashTable));
/* TODO: revisit this start size, may be its not optimal */
zend_hash_init_ex(resulting_table, 10, NULL, NULL, 0, 0);
zend_hash_init_ex(resulting_table, 10, NULL, NULL, 1, 0);
for (i = 0; i < ce->num_traits; i++) {
function_tables[i] = (HashTable *)emalloc(sizeof(HashTable));
function_tables[i] = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(function_tables[i], ce->traits[i]->function_table.nNumOfElements, NULL, NULL, 1, 0);
if (ce->trait_precedences) {
......@@ -4117,14 +4116,14 @@ static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{
for (i = 0; i < ce->num_traits; i++) {
/* zend_hash_destroy(function_tables[i]); */
zend_hash_graceful_destroy(function_tables[i]);
efree(function_tables[i]);
free(function_tables[i]);
}
efree(function_tables);
free(function_tables);
/* free temporary resulting table */
/* zend_hash_destroy(resulting_table); */
zend_hash_graceful_destroy(resulting_table);
efree(resulting_table);
free(resulting_table);
}
/* }}} */
......
......@@ -168,7 +168,7 @@ ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(TSRMLS_D)
ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size TSRMLS_DC)
{
if (CG(script_encoding_list)) {
free(CG(script_encoding_list));
efree(CG(script_encoding_list));
}
CG(script_encoding_list) = encoding_list;
CG(script_encoding_list_size) = encoding_list_size;
......
......@@ -215,12 +215,6 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
void _destroy_zend_class_traits_info(zend_class_entry *ce)
{
if (ce->num_traits > 0 && ce->traits) {
size_t i;
for (i = 0; i < ce->num_traits; i++) {
if (ce->traits[i]) {
destroy_zend_class(&ce->traits[i]);
}
}
efree(ce->traits);
}
......
......@@ -3636,8 +3636,8 @@ ac_config_headers="$ac_config_headers main/php_config.h"
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=5
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=4
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr $PHP_MAJOR_VERSION \* 10000 + $PHP_MINOR_VERSION \* 100 + $PHP_RELEASE_VERSION`
......@@ -11596,18 +11596,6 @@ _ACEOF
fi
done
for ac_header in sysexits.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
if test "x$ac_cv_header_sysexits_h" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYSEXITS_H 1
_ACEOF
fi
done
......@@ -11814,10 +11802,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether ptrace works... " >&6; }
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped (cross compiling)" >&5
$as_echo "skipped (cross compiling)" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
......@@ -11972,10 +11960,10 @@ $as_echo "#define HAVE_MACH_VM_READ 1" >>confdefs.h
$as_echo_n "checking for proc mem file... " >&6; }
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: skipped (cross compiling)" >&5
$as_echo "skipped (cross compiling)" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error "cannot run test program while cross compiling
See \`config.log' for more details." "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
......@@ -86497,44 +86485,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for field ss_family in struct sockaddr_storage" >&5
$as_echo_n "checking for field ss_family in struct sockaddr_storage... " >&6; }
if test "${ac_cv_ss_family+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
struct sockaddr_storage sa_store; sa_store.ss_family = AF_INET6;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_ss_family=yes
else
ac_cv_ss_family=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ss_family" >&5
$as_echo "$ac_cv_ss_family" >&6; }
if test "$ac_cv_ss_family" = yes; then
$as_echo "#define HAVE_SA_SS_FAMILY 1" >>confdefs.h
fi
ext_builddir=ext/sockets
ext_srcdir=$abs_srcdir/ext/sockets
......@@ -103813,7 +103763,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 103816 "configure"
#line 103766 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -105725,7 +105675,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 105728 "configure"' > conftest.$ac_ext
echo '#line 105678 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -107117,7 +107067,7 @@ else
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cat > conftest.$ac_ext <<EOF
#line 107120 "configure"
#line 107070 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -107275,11 +107225,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"configure:107278: $lt_compile\"" >&5)
(eval echo "\"configure:107228: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "configure:107282: \$? = $ac_status" >&5
echo "configure:107232: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -107573,11 +107523,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"configure:107576: $lt_compile\"" >&5)
(eval echo "\"configure:107526: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "configure:107580: \$? = $ac_status" >&5
echo "configure:107530: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -107677,11 +107627,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"configure:107680: $lt_compile\"" >&5)
(eval echo "\"configure:107630: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "configure:107684: \$? = $ac_status" >&5
echo "configure:107634: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -108141,7 +108091,7 @@ _LT_EOF
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
#line 108144 "configure"
#line 108094 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -108183,7 +108133,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
#line 108186 "configure"
#line 108136 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -109708,7 +109658,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 109711 "configure"
#line 109661 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -109808,7 +109758,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 109811 "configure"
#line 109761 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -110873,7 +110823,7 @@ case $host_os in
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
#line 110876 "configure"
#line 110826 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -110916,7 +110866,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
#line 110919 "configure"
#line 110869 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -112168,11 +112118,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"configure:112171: $lt_compile\"" >&5)
(eval echo "\"configure:112121: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "configure:112175: \$? = $ac_status" >&5
echo "configure:112125: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -112272,11 +112222,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"configure:112275: $lt_compile\"" >&5)
(eval echo "\"configure:112225: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "configure:112279: \$? = $ac_status" >&5
echo "configure:112229: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=5
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=4
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
......
--TEST--
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip";
if(substr(PHP_OS, 0, 3) != 'WIN' )
die("skip Not Valid for Linux");
?>
--INI--
open_basedir="c:/tmp"
--FILE--
<?php
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/tmp/foo"));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
curl_close($ch);
?>
--EXPECTF--
%a
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/tmp/foo) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
bool(false)
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
bool(false)
--TEST--
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip";
if(substr(PHP_OS, 0, 3) == 'WIN' )
die("skip Not Valid for Windows");
?>
<?php if (!extension_loaded("curl")) print "skip"; ?>
--INI--
open_basedir="/tmp"
--FILE--
......
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
--- libmagic.orig/apprentice.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/apprentice.c 2012-04-22 18:57:16.215980866 +0200
--- libmagic.orig/apprentice.c 2012-04-22 19:30:43.182305355 +0800
+++ libmagic/apprentice.c 2012-04-22 19:28:57.346309536 +0800
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
......@@ -729,8 +729,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
--- libmagic.orig/ascmagic.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/ascmagic.c 2012-04-22 18:57:16.215980866 +0200
--- libmagic.orig/ascmagic.c 2012-04-22 19:30:43.182305355 +0800
+++ libmagic/ascmagic.c 2012-04-22 19:28:57.330309533 +0800
@@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
......@@ -755,8 +755,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
return rv;
}
diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/cdf.c 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/cdf.c 2012-04-22 19:30:43.182305355 +0800
+++ libmagic/cdf.c 2012-04-22 19:28:57.370309531 +0800
@@ -43,7 +43,17 @@
#include <err.h>
#endif
......@@ -819,8 +819,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
(void)fprintf(stderr, "timestamp %s\n", buf);
} else {
diff -u libmagic.orig/cdf.h libmagic/cdf.h
--- libmagic.orig/cdf.h 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/cdf.h 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/cdf.h 2012-04-22 19:30:43.182305355 +0800
+++ libmagic/cdf.h 2012-04-22 19:28:57.370309531 +0800
@@ -35,7 +35,7 @@
#ifndef _H_CDF_
#define _H_CDF_
......@@ -857,8 +857,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
--- libmagic.orig/cdf_time.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/cdf_time.c 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/cdf_time.c 2012-04-22 19:30:43.182305355 +0800
+++ libmagic/cdf_time.c 2012-04-22 19:28:57.326309537 +0800
@@ -96,7 +96,7 @@
}
......@@ -916,8 +916,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const char *ref = "Sat Apr 23 01:30:00 1977";
char *p, *q;
diff -u libmagic.orig/compress.c libmagic/compress.c
--- libmagic.orig/compress.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/compress.c 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/compress.c 2012-04-22 19:30:43.182305355 +0800
+++ libmagic/compress.c 2012-04-22 19:28:57.314309548 +0800
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
......@@ -1079,8 +1079,8 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
diff -u libmagic.orig/file.h libmagic/file.h
--- libmagic.orig/file.h 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/file.h 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/file.h 2012-04-22 19:30:43.186305188 +0800
+++ libmagic/file.h 2012-04-22 19:49:58.922256776 +0800
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
......@@ -1252,8 +1252,8 @@ diff -u libmagic.orig/file.h libmagic/file.h
+
#endif /* __file_h__ */
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
--- libmagic.orig/fsmagic.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/fsmagic.c 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/fsmagic.c 2012-04-22 19:30:43.186305188 +0800
+++ libmagic/fsmagic.c 2012-04-22 19:28:57.298309521 +0800
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
......@@ -1577,8 +1577,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
/*
diff -u libmagic.orig/funcs.c libmagic/funcs.c
--- libmagic.orig/funcs.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/funcs.c 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/funcs.c 2012-04-22 19:30:43.186305188 +0800
+++ libmagic/funcs.c 2012-04-22 19:28:57.370309531 +0800
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
......@@ -1872,9 +1872,11 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+ return rep_cnt;
}
+
Only in libmagic.orig: funcs.c.orig
Only in libmagic.orig: funcs.c.rej
diff -u libmagic.orig/magic.c libmagic/magic.c
--- libmagic.orig/magic.c 2012-05-29 14:40:41.710960045 +0200
+++ libmagic/magic.c 2012-04-22 18:57:16.219978162 +0200
--- libmagic.orig/magic.c 2012-04-22 19:30:43.186305188 +0800
+++ libmagic/magic.c 2012-04-22 19:28:57.370309531 +0800
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
......@@ -2251,8 +2253,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c