Commit f4be957a authored by Ondrej Sury's avatar Ondrej Sury

Imported Upstream version 5.5.0~rc2+dfsg

parent e421dce5
......@@ -147,7 +147,7 @@ STATUS: Working
COMMENT: Tested on phpts and isapi versions
-------------------------------------------------------------------------------
EXTENSION: mysql
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Johannes Schlter <johannes@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
STATUS: Working
-------------------------------------------------------------------------------
......@@ -158,7 +158,7 @@ STATUS: Working
SINCE: 5.0
-------------------------------------------------------------------------------
EXTENSION: mysqlnd
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlter <johannes@php.net>, Ulf Wendel <uw@php.net>
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlter <johannes@php.net>, Ulf Wendel <uw@php.net>
MAINTENANCE: Maintained
STATUS: Working
SINCE: 5.3
......
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 May 2013, PHP 5.5.0 Release Candidate 2
- Core:
. Fixed bug #64660 (Segfault on memory exhaustion within function definition).
(Stas, reported by Juha Kylmänen)
. Fixed bug #64720 (SegFault on zend_deactivate). (Dmitry)
. Fixed bug #64853 (Use of no longer available ini directives causes crash
on TS build). (Anatol)
- Calendar:
. Fixed bug #64895 (Integer overflow in SndToJewish). (Remi)
- Fileinfo:
. Fixed bug #64830 (mimetype detection segfaults on mp3 file). (Anatol)
- FPM:
. Add --with-fpm-systemd option to report health to systemd, and
systemd_interval option to configure this. The service can now use
Type=notify in the systemd unit file. (Remi)
- mbstring:
. Fixed bug #64769 (mbstring PHPTs crash on Windows x64). (Anatol)
- mysqli:
. Fixed bug #64394 (MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS undeclared when
using Connector/C). (Andrey)
- Sockets:
. Fixed bug #64508 (Fails to build with --disable-ipv6). (Gustavo)
- Zend Engine:
. Fixed bug #64821 (Custom Exceptions crash when internal properties overridden).
(Anatol)
- DateTime
. Fixed bug #64825 (Invalid free when unserializing DateTimeZone).
(Anatol)
09 May 2013, PHP 5.5.0 Release Candidate 1
- FPM:
......@@ -25,7 +63,7 @@ PHP NEWS
25 Apr 2013, PHP 5.5.0 Beta 4
- Core:
. Fixed bug #64677 (execution operator `` stealing surrounding arguments).
. Fixed bug #64677 (execution operator `` stealing surrounding arguments).
(Laruence)
- CURL:
......@@ -44,13 +82,13 @@ PHP NEWS
(Eric Iversen)
- Streams:
. Fixed Windows x64 version of stream_socket_pair() and improved error handling
(Anatol Belski)
. Fixed Windows x64 version of stream_socket_pair() and improved error
handling. (Anatol Belski)
11 Apr 2013, PHP 5.5.0 Beta 3
- Core:
. Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
. Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
segfault). (Laruence)
. Fixed bug #64565 (copy doesn't report failure on partial copy). (Remi)
. Fixed bug #64555 (foreach no longer copies keys if they are interned).
......@@ -68,7 +106,7 @@ PHP NEWS
Kapelushnik, Derick)
- General improvements:
. Drop support for bison < 2.4 when building PHP from GIT source.
. Drop support for bison < 2.4 when building PHP from GIT source.
(Laruence)
- Fileinfo:
......@@ -106,7 +144,7 @@ PHP NEWS
21 Mar 2013, PHP 5.5.0 Beta 1
- Core:
. Added Zend Opcache extension and enable building it by default.
. Added Zend Opcache extension and enable building it by default.
More details here: https://wiki.php.net/rfc/optimizerplus. (Dmitry)
. Added array_column function which returns a column in a multidimensional
array. https://wiki.php.net/rfc/array_column. (Ben Ramsey)
......@@ -214,7 +252,7 @@ PHP NEWS
. Fixed bug #64264 (SPLFixedArray toArray problem). (Laruence)
. Fixed bug #64228 (RecursiveDirectoryIterator always assumes SKIP_DOTS).
(patch by kriss@krizalys.com, Laruence)
. Fixed bug #64106 (Segfault on SplFixedArray[][x] = y when extended).
. Fixed bug #64106 (Segfault on SplFixedArray[][x] = y when extended).
(Nikita Popov)
. Fixed bug #52861 (unset fails with ArrayObject and deep arrays).
(Mike Willbanks)
......
......@@ -58,6 +58,10 @@ PHP 5.5 UPGRADE NOTES
- Support for changing the process's title in CLI/CLI-Server SAPIs. (Keyur)
(https://wiki.php.net/rfc/cli_process_title)
- Support for systemd in php-fpm:
Add --with-fpm-systemd option to report health to systemd, and
systemd_interval option to configure this. The service can now use
Type=notify in the systemd unit file. (Remi)
========================================
3. Deprecated Functionality
......
This diff is collapsed.
--TEST--
Bug #64720 (SegFault on zend_deactivate)
--FILE--
<?php
class Stat {
private static $requests;
public static function getInstance() {
if (!isset(self::$requests[1])) {
self::$requests[1] = new self();
}
return self::$requests[1];
}
public function __destruct() {
unset(self::$requests[1]);
}
}
class Foo {
public function __construct() {
Stat::getInstance();
}
}
class Error {
private $trace;
public function __construct() {
$this->trace = debug_backtrace(1);
}
}
class Bar {
public function __destruct() {
Stat::getInstance();
new Error();
}
public function test() {
new Error();
}
}
$foo = new Foo();
$bar = new Bar();
$bar->test();
?>
--EXPECTF--
Fatal error: Access to undeclared static property: Stat::$requests in %sbug64720.php on line 12
--TEST--
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 1)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->message = NULL;
$this->string = NULL;
$this->code = array();
$this->line = "hello";
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in %s:0
Stack trace:
#0 {main}
thrown in %s on line %d
--TEST--
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 2)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->line = array();
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in %s:0
Stack trace:
#0 {main}
thrown in %s on line %d
--TEST--
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 3)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->line = array();
$this->file = NULL;
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in :0
Stack trace:
#0 {main}
thrown in Unknown on line %d
......@@ -90,7 +90,7 @@ typedef struct _zend_fcall_info_cache {
#define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags)
#define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, zend_name, name, arg_info, 0)
#define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)
#define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)
......
......@@ -817,6 +817,10 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) {
file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC);
line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC);
convert_to_string(file);
file = (Z_STRLEN_P(file) > 0) ? file : NULL;
line = (Z_TYPE_P(line) == IS_LONG) ? line : NULL;
} else {
file = NULL;
line = NULL;
......@@ -828,7 +832,11 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC);
line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC);
zend_error_va(severity, Z_STRVAL_P(file), Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
convert_to_string(str);
convert_to_string(file);
convert_to_long(line);
zend_error_va(severity, (Z_STRLEN_P(file) > 0) ? Z_STRVAL_P(file) : NULL, Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
} else {
zend_error(severity, "Uncaught exception '%s'", ce_exception->name);
}
......
......@@ -587,7 +587,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
if (compiler_result != 0) { /* parser error */
zend_bailout();
}
compilation_successful=1;
......@@ -762,7 +762,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
SCNG(script_filtered) = NULL;
}
if (compiler_result==1) {
if (compiler_result != 0) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
destroy_op_array(op_array TSRMLS_CC);
......
......@@ -585,7 +585,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
if (compiler_result != 0) { /* parser error */
zend_bailout();
}
compilation_successful=1;
......@@ -760,7 +760,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
SCNG(script_filtered) = NULL;
}
if (compiler_result==1) {
if (compiler_result != 0) {
CG(active_op_array) = original_active_op_array;
CG(unclean_shutdown)=1;
destroy_op_array(op_array TSRMLS_CC);
......
......@@ -1281,6 +1281,14 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *p
}
}
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL) ||
UNEXPECTED(CE_STATIC_MEMBERS(ce)[property_info->offset] == NULL)) {
if (!silent) {
zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
}
return NULL;
}
return &CE_STATIC_MEMBERS(ce)[property_info->offset];
}
/* }}} */
......
......@@ -166,8 +166,9 @@ static inline void cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC)
for (i = 0; i < ce->default_static_members_count; i++) {
if (ce->static_members_table[i]) {
zval_ptr_dtor(&ce->static_members_table[i]);
zval *p = ce->static_members_table[i];
ce->static_members_table[i] = NULL;
zval_ptr_dtor(&p);
}
}
ce->static_members_table = NULL;
......
......@@ -848,6 +848,7 @@ php_fpm_localstatedir
php_fpm_sysconfdir
php_fpm_group
php_fpm_user
php_fpm_systemd
SHLIB_DL_SUFFIX_NAME
SHLIB_SUFFIX_NAME
RE2C
......@@ -940,6 +941,7 @@ enable_embed
enable_fpm
with_fpm_user
with_fpm_group
with_fpm_systemd
with_isapi
with_litespeed
with_milter
......@@ -1770,6 +1772,7 @@ SAPI modules:
--with-fpm-user=USER Set the user for php-fpm to run as. (default: nobody)
--with-fpm-group=GRP Set the group for php-fpm to run as. For a system user, this
should usually be set to match the fpm username (default: nobody)
--with-fpm-systemd Activate systemd integration
--with-isapi=DIR Build PHP as an ISAPI module for use with Zeus
--with-litespeed Build PHP as litespeed module
--with-milter=DIR Build PHP as Milter application
......@@ -3684,7 +3687,7 @@ ac_config_headers="$ac_config_headers main/php_config.h"
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=5
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="RC1"
PHP_EXTRA_VERSION="RC2"
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`
......@@ -12651,6 +12654,117 @@ ext_output=$PHP_FPM_GROUP
php_with_fpm_systemd=no
# Check whether --with-fpm-systemd was given.
if test "${with_fpm_systemd+set}" = set; then :
withval=$with_fpm_systemd; PHP_FPM_SYSTEMD=$withval
else
PHP_FPM_SYSTEMD=no
fi
ext_output=$PHP_FPM_SYSTEMD
if test "$PHP_FPM_SYSTEMD" != "no" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_notify in -lsystemd-daemon" >&5
$as_echo_n "checking for sd_notify in -lsystemd-daemon... " >&6; }
if ${ac_cv_lib_systemd_daemon_sd_notify+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsystemd-daemon $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char sd_notify ();
int
main ()
{
return sd_notify ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_systemd_daemon_sd_notify=yes
else
ac_cv_lib_systemd_daemon_sd_notify=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_systemd_daemon_sd_notify" >&5
$as_echo "$ac_cv_lib_systemd_daemon_sd_notify" >&6; }
if test "x$ac_cv_lib_systemd_daemon_sd_notify" = xyes; then :
SYSTEMD_LIBS="-lsystemd-daemon"
fi
for ac_header in systemd/sd-daemon.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYSTEMD_SD_DAEMON_H 1
_ACEOF
HAVE_SD_DAEMON_H="yes"
else
HAVE_SD_DAEMON_H="no"
fi
done
if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then
as_fn_error $? "Your system does not support systemd." "$LINENO" 5
else
$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
PHP_FPM_SD_FILES="fpm/fpm_systemd.c"
case systemd-daemon in
c|c_r|pthread*) ;;
*)
LIBS="-lsystemd-daemon $LIBS"
;;
esac
php_fpm_systemd=notify
fi
else
php_fpm_systemd=simple
fi
PHP_VAR_SUBST="$PHP_VAR_SUBST php_fpm_systemd"
cat >>confdefs.h <<_ACEOF
#define PHP_FPM_SYSTEMD "$php_fpm_systemd"
_ACEOF
if test -z "$PHP_FPM_USER" -o "$PHP_FPM_USER" = "yes" -o "$PHP_FPM_USER" = "no"; then
php_fpm_user="nobody"
else
......@@ -12838,7 +12952,7 @@ _ACEOF
old_IFS=$IFS
for ac_src in $PHP_FPM_FILES $PHP_FPM_TRACE_FILES; do
for ac_src in $PHP_FPM_FILES $PHP_FPM_TRACE_FILES $PHP_FPM_SD_FILES; do
IFS=.
set $ac_src
......@@ -102827,7 +102941,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 102830 "configure"
#line 102944 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -104739,7 +104853,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 104742 "configure"' > conftest.$ac_ext
echo '#line 104856 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -106131,7 +106245,7 @@ else
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cat > conftest.$ac_ext <<EOF
#line 106134 "configure"
#line 106248 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -106289,11 +106403,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:106292: $lt_compile\"" >&5)
(eval echo "\"configure:106406: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "configure:106296: \$? = $ac_status" >&5
echo "configure:106410: \$? = $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.
......@@ -106587,11 +106701,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:106590: $lt_compile\"" >&5)
(eval echo "\"configure:106704: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "configure:106594: \$? = $ac_status" >&5
echo "configure:106708: \$? = $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.
......@@ -106691,11 +106805,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:106694: $lt_compile\"" >&5)
(eval echo "\"configure:106808: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "configure:106698: \$? = $ac_status" >&5
echo "configure:106812: \$? = $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
......@@ -107155,7 +107269,7 @@ _LT_EOF
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
#line 107158 "configure"
#line 107272 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -107197,7 +107311,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 107200 "configure"
#line 107314 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -108722,7 +108836,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 108725 "configure"
#line 108839 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -108822,7 +108936,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 108825 "configure"
#line 108939 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -109887,7 +110001,7 @@ case $host_os in
# Determine the default libpath from the value encoded in an empty executable.
cat > conftest.$ac_ext <<EOF
#line 109890 "configure"
#line 110004 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -109930,7 +110044,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 109933 "configure"
#line 110047 "configure"
#include "confdefs.h"
int main() {
; return 0; }
......@@ -111182,11 +111296,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:111185: $lt_compile\"" >&5)
(eval echo "\"configure:111299: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "configure:111189: \$? = $ac_status" >&5
echo "configure:111303: \$? = $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.
......@@ -111286,11 +111400,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:111289: $lt_compile\"" >&5)
(eval echo "\"configure:111403: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "configure:111293: \$? = $ac_status" >&5
echo "configure:111407: \$? = $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
......@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=5
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="RC1"
PHP_EXTRA_VERSION="RC2"
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`
......
......@@ -272,6 +272,7 @@
#define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7))
#define JEWISH_SDN_OFFSET 347997
#define JEWISH_SDN_MAX 324542846L /* 12/13/887605, greater value raises interger overflow */
#define NEW_MOON_OF_CREATION 31524
#define SUNDAY 0
......@@ -559,7 +560,7 @@ void SdnToJewish(
int tishri1After;
int yearLength;
if (sdn <= JEWISH_SDN_OFFSET) {
if (sdn <= JEWISH_SDN_OFFSET || sdn > JEWISH_SDN_MAX) {
*pYear = 0;
*pMonth = 0;
*pDay = 0;
......
--TEST--
Bug #64895: Integer overflow in SndToJewish
--SKIPIF--
<?php
include 'skipif.inc';
if (PHP_INT_SIZE == 4) {
die("skip this test is for 64bit platform only");
}
?>
--FILE--
<?php
$a = array(38245310, 324542846, 324542847, 9223372036854743639);
foreach ($a as $x) var_dump(jdtojewish($x));
--EXPECTF--
string(11) "2/22/103759"
string(12) "12/13/887605"
string(5) "0/0/0"
string(5) "0/0/0"
......@@ -3704,27 +3704,30 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez
zval **z_timezone = NULL;
zval **z_timezone_type = NULL;
timelib_tzinfo *tzi;
char **offset;
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
convert_to_long(*z_timezone_type);
switch (Z_LVAL_PP(z_timezone_type)) {
case TIMELIB_ZONETYPE_OFFSET:
offset = malloc(sizeof(char) * (Z_STRLEN_PP(z_timezone) + 1));
*offset = (Z_STRVAL_PP(z_timezone));
if(**offset == '+'){
++*offset;
(*tzobj)->tzi.utc_offset = -1 * timelib_parse_tz_cor((char **)offset);
case TIMELIB_ZONETYPE_OFFSET: {
char *offset, *offset_start;
offset = emalloc(sizeof(char) * (Z_STRLEN_PP(z_timezone) + 1));
memmove(offset, Z_STRVAL_PP(z_timezone), Z_STRLEN_PP(z_timezone)+1);
offset_start = offset;
++offset;
if(*offset_start == '+'){
(*tzobj)->tzi.utc_offset = -1 * timelib_parse_tz_cor(&offset);
} else {
++*offset;
(*tzobj)->tzi.utc_offset = timelib_parse_tz_cor((char **)offset);
(*tzobj)->tzi.utc_offset = timelib_parse_tz_cor(&offset);
}
free(offset);
efree(offset_start);
(*tzobj)->type = TIMELIB_ZONETYPE_OFFSET;
(*tzobj)->initialized = 1;
return SUCCESS;
break;
}
case TIMELIB_ZONETYPE_ABBR:
case TIMELIB_ZONETYPE_ID:
if (SUCCESS == timezone_initialize(&tzi, Z_STRVAL_PP(z_timezone) TSRMLS_CC)) {
......
......@@ -2978,7 +2978,7 @@ diff -u libmagic.orig/readelf.h libmagic/readelf.h
typedef uint8_t Elf64_Char;
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/softmagic.c 2013-04-08 15:42:57.328298809 +0200
+++ libmagic/softmagic.c 2013-05-14 11:00:07.044745939 +0200
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
......@@ -3123,7 +3123,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
}
@@ -1717,9 +1694,9 @@
@@ -1717,12 +1694,12 @@
ms->o.buf = sbuf;
ms->offset = soffset;
if (rv == 1) {
......@@ -3134,7 +3134,11 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
+ return -1;
if (file_printf(ms, "%s", rbuf) == -1)
return -1;
free(rbuf);
- free(rbuf);
+ efree(rbuf);
}
return rv;
@@ -1837,6 +1814,42 @@
return file_strncmp(a, b, len, flags);
}
......