Skip to content

Commit a983ded

Browse files
committed
Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
2 parents f8c280d + 3fe3029 commit a983ded

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+40534
-29177
lines changed

NEWS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2012, PHP 5.3.19
44

5+
- Core
6+
. Fixed bug #63241 (PHP fails to open Windows deduplicated files).
7+
(daniel dot stelter-gliese at innogames dot de)
8+
. Fixed bug #62444 (Handle leak in is_readable on windows).
9+
(krazyest at seznam dot cz)
10+
11+
- Libxml
12+
. Fixed bug #63389 (Missing context check on libxml_set_streams_context()
13+
causes memleak). (Laruence)
14+
515
- MySQL:
616
. Fixed compilation failure on mixed 32/64 bit systems. (Andrey)
717

@@ -12,15 +22,24 @@ PHP NEWS
1222
- PCRE:
1323
. Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite).
1424
(Dmitry, Laruence)
25+
. Fixed bug #63284 (Upgrade PCRE to 8.31). (Anatoliy)
1526

1627
- PDO:
1728
. Fixed bug #63235 (buffer overflow in use of SQLGetDiagRec).
1829
(Martin Osvald, Remi)
1930

31+
- PDO_pgsql:
32+
. Fixed bug #62593 (Emulate prepares behave strangely with PARAM_BOOL).
33+
(Will Fitch)
34+
2035
- Streams:
2136
. Fixed bug #63240 (stream_get_line() return contains delimiter string).
2237
(Tjerk, Gustavo)
2338

39+
- Phar:
40+
. Fixed bug #63297 (Phar fails to write an openssl based signature).
41+
(Anatoliy)
42+
2443
18 Oct 2012, PHP 5.3.18
2544

2645
- Core:

TSRM/tsrm_virtual_cwd.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
4141
# endif
4242

43+
# ifndef IO_REPARSE_TAG_DEDUP
44+
# define IO_REPARSE_TAG_DEDUP 0x80000013
45+
# endif
46+
4347
# ifndef VOLUME_NAME_NT
4448
# define VOLUME_NAME_NT 0x2
4549
# endif
@@ -958,6 +962,11 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
958962
return -1;
959963
};
960964
substitutename[substitutename_len] = 0;
965+
}
966+
else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP) {
967+
isabsolute = 1;
968+
memcpy(substitutename, path, len + 1);
969+
substitutename_len = len;
961970
} else {
962971
tsrm_free_alloca(pbuffer, use_heap_large);
963972
return -1;

TSRM/tsrm_win32.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ PSID tsrm_win32_get_token_sid(HANDLE hToken)
193193
TSRM_API int tsrm_win32_access(const char *pathname, int mode)
194194
{
195195
time_t t;
196-
HANDLE thread_token;
196+
HANDLE thread_token = NULL;
197197
PSID token_sid;
198198
SECURITY_INFORMATION sec_info = OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION;
199199
GENERIC_MAPPING gen_map = { FILE_GENERIC_READ, FILE_GENERIC_WRITE, FILE_GENERIC_EXECUTE, FILE_ALL_ACCESS };
@@ -365,6 +365,9 @@ TSRM_API int tsrm_win32_access(const char *pathname, int mode)
365365
}
366366

367367
Finished:
368+
if(thread_token != NULL) {
369+
CloseHandle(thread_token);
370+
}
368371
if(real_path != NULL) {
369372
free(real_path);
370373
real_path = NULL;

ext/date/lib/timezonedb.h

Lines changed: 451 additions & 452 deletions
Large diffs are not rendered by default.

ext/gd/config.w32

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ if (PHP_GD != "no") {
1313
(CHECK_LIB("libiconv_a.lib;libiconv.lib", "gd", PHP_GD) || CHECK_LIB("iconv_a.lib;iconv.lib", "gd", PHP_GD)) &&
1414
CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_GD", PHP_GD) &&
1515
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "gd", PHP_GD) )) ||
16-
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "gd", PHP_GD)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
16+
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "gd", PHP_GD)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
17+
CHECK_LIB("libXpm_a.lib", "gd", PHP_GD) &&
18+
CHECK_HEADER_ADD_INCLUDE("xpm.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\X11")
1719
) {
1820
if (PHP_T1LIB != "no") {
1921
if (CHECK_LIB("T1_StaticMD.lib", "gd", PHP_GD) &&
@@ -54,13 +56,15 @@ if (PHP_GD != "no") {
5456
/D HAVE_GD_STRINGTTF=1 \
5557
/D HAVE_GD_WBMP \
5658
/D HAVE_GD_XBM \
59+
/D HAVE_GD_XPM \
5760
/D HAVE_LIBFREETYPE=1 \
5861
/D HAVE_LIBGD13=1 \
5962
/D HAVE_LIBGD15=1 \
6063
/D HAVE_LIBGD20=1 \
6164
/D HAVE_LIBGD204=1 \
6265
/D HAVE_LIBJPEG \
6366
/D HAVE_LIBPNG \
67+
/D HAVE_XPM \
6468
/D HAVE_COLORCLOSESTHWB \
6569
/D USE_GD_IMGSTRTTF \
6670
/D USE_GD_IOCTX \

ext/libxml/libxml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ static PHP_FUNCTION(libxml_set_streams_context)
699699
{
700700
zval *arg;
701701

702-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
702+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg) == FAILURE) {
703703
return;
704704
}
705705
if (LIBXML(stream_context)) {

ext/libxml/tests/004.phpt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@ echo "Done\n";
2727

2828
?>
2929
--EXPECTF--
30-
Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line 10
31-
NULL
30+
Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line %d
3231

33-
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
34-
bool(true)
32+
Warning: libxml_set_streams_context() expects parameter 1 to be resource, null given in %s004.php on line %d
3533
NULL
36-
37-
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
3834
bool(true)
39-
NULL
4035

41-
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
42-
bool(true)
36+
Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %s004.php on line %d
4337
NULL
38+
bool(true)
4439

45-
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
40+
Warning: libxml_set_streams_context() expects parameter 1 to be resource, integer given in %s004.php on line %d
41+
NULL
4642
bool(true)
43+
44+
Warning: libxml_set_streams_context() expects parameter 1 to be resource, object given in %s004.php on line %d
4745
NULL
46+
bool(true)
4847

49-
Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
48+
Warning: libxml_set_streams_context() expects parameter 1 to be resource, array given in %s004.php on line %d
49+
NULL
5050
bool(true)
5151
NULL
5252
bool(true)

ext/libxml/tests/bug63389.phpt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak)
3+
--SKIPIF--
4+
<?php if (!extension_loaded('libxml')) die('skip'); ?>
5+
--FILE--
6+
<?php
7+
$fp = fopen("php://input", "r");
8+
libxml_set_streams_context($fp);
9+
libxml_set_streams_context("a");
10+
echo "okey";
11+
?>
12+
--EXPECTF--
13+
Warning: libxml_set_streams_context() expects parameter 1 to be resource, string given in %sbug63389.php on line %d
14+
okey

ext/mysqlnd/mysqlnd_wireprotocol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC)
982982
p += 2;
983983
BAIL_IF_NO_MORE_DATA;
984984

985-
meta->decimals = uint2korr(p);
985+
meta->decimals = uint1korr(p);
986986
p += 1;
987987
BAIL_IF_NO_MORE_DATA;
988988

ext/oci8/config.m4

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ else
88
PHP_OCI8_SED="$SED";
99
fi
1010

11+
PHP_OCI8_TAIL1=`echo a | tail -n1 2>/dev/null`
12+
if test "$PHP_OCI8_TAIL1" = "a"; then
13+
PHP_OCI8_TAIL1="tail -n1"
14+
else
15+
PHP_OCI8_TAIL1="tail -1"
16+
fi
17+
1118
AC_DEFUN([PHP_OCI_IF_DEFINED],[
1219
old_CPPFLAGS=$CPPFLAGS
1320
CPPFLAGS=$3
@@ -49,8 +56,8 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[
4956
AC_DEFUN([AC_OCI8IC_VERSION],[
5057
AC_MSG_CHECKING([Oracle Instant Client library version compatibility])
5158
OCI8_LCS_BASE=$PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME
52-
OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
53-
OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | tail -n1`
59+
OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc
60+
OCI8_NNZ=`ls $PHP_OCI8_INSTANT_CLIENT/libnnz*.$SHLIB_SUFFIX_NAME 2> /dev/null | $PHP_OCI8_TAIL1`
5461
if test -f "$OCI8_NNZ" && test -f "$OCI8_LCS"; then
5562
if test ! -f "$OCI8_LCS_BASE"; then
5663
AC_MSG_ERROR([Link from $OCI8_LCS_BASE to $OCI8_LCS_BASE.*.1 not found])
@@ -65,7 +72,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[
6572
AC_DEFUN([AC_OCI8_ORACLE_VERSION],[
6673
AC_MSG_CHECKING([Oracle library version compatibility])
6774
OCI8_LCS_BASE=$OCI8_DIR/$OCI8_LIB_DIR/libclntsh.$SHLIB_SUFFIX_NAME
68-
OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | tail -n1` # Oracle 10g, 11g etc
75+
OCI8_LCS=`ls $OCI8_LCS_BASE.*.1 2> /dev/null | $PHP_OCI8_TAIL1` # Oracle 10g, 11g etc
6976
if test -s "$OCI8_DIR/orainst/unix.rgs"; then
7077
OCI8_ORACLE_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | $PHP_OCI8_SED 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
7178
test -z "$OCI8_ORACLE_VERSION" && OCI8_ORACLE_VERSION=7.3
@@ -278,7 +285,7 @@ if test "$PHP_OCI8" != "no"; then
278285
dnl user must pass in the library directory. But on Linux we default
279286
dnl to the most recent version in /usr/lib which is where the Oracle
280287
dnl Instant Client RPM gets installed.
281-
PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | tail -n1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
288+
PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib/libclntsh.* 2> /dev/null | $PHP_OCI8_TAIL1 | $PHP_OCI8_SED -e 's#/libclntsh[^/]*##'`
282289
if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
283290
AC_MSG_ERROR([Oracle Instant Client directory /usr/lib/oracle/.../client${PHP_OCI8_IC_LIBDIR_SUFFIX}/lib libraries not found. Try --with-oci8=instantclient,DIR])
284291
fi

ext/oci8/package.xml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,16 @@ http://pear.php.net/dtd/package-2.0.xsd">
3737
<time>12:00:00</time>
3838

3939
<version>
40-
<release>1.4.8</release>
41-
<api>1.4.8</api>
40+
<release>1.4.9</release>
41+
<api>1.4.9</api>
4242
</version>
4343
<stability>
4444
<release>stable</release>
4545
<api>stable</api>
4646
</stability>
4747
<license uri="http://www.php.net/license">PHP</license>
4848
<notes>
49-
Fixed bug #63307 (Unused variable in oci8.c)
50-
Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro)
51-
Fixed bug #60901 (Improve "tail" syntax for AIX installation)
49+
Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
5250
</notes>
5351
<contents>
5452
<dir name="/">
@@ -412,6 +410,23 @@ http://pear.php.net/dtd/package-2.0.xsd">
412410
</extsrcrelease>
413411
<changelog>
414412

413+
<release>
414+
<version>
415+
<release>1.4.8</release>
416+
<api>1.4.8</api>
417+
</version>
418+
<stability>
419+
<release>stable</release>
420+
<api>stable</api>
421+
</stability>
422+
<license uri="http://www.php.net/license">PHP</license>
423+
<notes>
424+
Fixed bug #63307 (Unused variable in oci8.c)
425+
Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro)
426+
Fixed bug #60901 (Improve "tail" syntax for AIX installation)
427+
</notes>
428+
</release>
429+
415430
<release>
416431
<version>
417432
<release>1.4.7</release>

ext/oci8/php_oci8.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*/
4747
#undef PHP_OCI8_VERSION
4848
#endif
49-
#define PHP_OCI8_VERSION "1.4.8"
49+
#define PHP_OCI8_VERSION "1.4.9"
5050

5151
extern zend_module_entry oci8_module_entry;
5252
#define phpext_oci8_ptr &oci8_module_entry

ext/pcre/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
EXTENSION("pcre", "php_pcre.c", false /* never shared */,
55
"-Iext/pcre/pcrelib");
6-
ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucd.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre");
6+
ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucd.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre");
77
ADD_DEF_FILE("ext\\pcre\\php_pcre.def");
88

99
AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library');

ext/pcre/config0.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ PHP_ARG_WITH(pcre-regex,,
5555
pcrelib_sources="pcrelib/pcre_chartables.c pcrelib/pcre_ucd.c \
5656
pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c \
5757
pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c \
58-
pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \
58+
pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \
5959
pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c \
60-
pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \
60+
pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
6161
pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
6262
PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-I@ext_srcdir@/pcrelib)
6363
PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)

ext/pcre/pcrelib/AUTHORS

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,38 @@ Email domain: cam.ac.uk
88
University of Cambridge Computing Service,
99
Cambridge, England.
1010

11-
Copyright (c) 1997-2010 University of Cambridge
11+
Copyright (c) 1997-2012 University of Cambridge
1212
All rights reserved
1313

1414

15+
PCRE JUST-IN-TIME COMPILATION SUPPORT
16+
-------------------------------------
17+
18+
Written by: Zoltan Herczeg
19+
Email local part: hzmester
20+
Emain domain: freemail.hu
21+
22+
Copyright(c) 2010-2012 Zoltan Herczeg
23+
All rights reserved.
24+
25+
26+
STACK-LESS JUST-IN-TIME COMPILER
27+
--------------------------------
28+
29+
Written by: Zoltan Herczeg
30+
Email local part: hzmester
31+
Emain domain: freemail.hu
32+
33+
Copyright(c) 2009-2012 Zoltan Herczeg
34+
All rights reserved.
35+
36+
1537
THE C++ WRAPPER LIBRARY
1638
-----------------------
1739

1840
Written by: Google Inc.
1941

20-
Copyright (c) 2007-2010 Google Inc
42+
Copyright (c) 2007-2012 Google Inc
2143
All rights reserved
2244

2345
####

0 commit comments

Comments
 (0)