mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 19:20:50 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e197c9b139 | ||
|
|
7522335b99 | ||
|
|
43416cfc06 | ||
|
|
0b92349da7 | ||
|
|
a50e1cb5a3 | ||
|
|
dc318cd7db |
No files matched your search
@@ -1,78 +1,5 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
12 May 2016, PHP 5.6.22RC1
|
||||
|
||||
- Core:
|
||||
. Fixed bug #72172 (zend_hex_strtod should not use strlen).
|
||||
(bwitz at hotmail dot com )
|
||||
|
||||
- Intl
|
||||
. Fixed bug #64524 (Add intl.use_exceptions to php.ini-*). (Anatol)
|
||||
|
||||
- Postgres:
|
||||
. Fixed bug #72151 (mysqli_fetch_object changed behaviour). (Anatol)
|
||||
|
||||
28 Apr 2016, PHP 5.6.21
|
||||
|
||||
- Core:
|
||||
. Fixed bug #69537 (__debugInfo with empty string for key gives error).
|
||||
(krakjoe)
|
||||
. Fixed bug #71841 (EG(error_zval) is not handled well). (Laruence)
|
||||
|
||||
- BCmath:
|
||||
. Fixed bug #72093 (bcpowmod accepts negative scale and corrupts
|
||||
_one_ definition). (Stas)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug #71831 (CURLOPT_NOPROXY applied as long instead of string).
|
||||
(Michael Sierks)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #71889 (DateInterval::format Segmentation fault). (Thomas Punt)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #72094 (Out of bounds heap read access in exif header processing). (Stas)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #71952 (Corruption inside imageaffinematrixget). (Stas)
|
||||
. Fixed bug #71912 (libgd: signedness vulnerability). (CVE-2016-3074) (Stas)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #72061 (Out-of-bounds reads in zif_grapheme_stripos with negative
|
||||
offset). (Stas)
|
||||
|
||||
- OCI8:
|
||||
. Fixed bug #71422 (Fix ORA-01438: value larger than specified precision
|
||||
allowed for this column). (Chris Jones)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #63171 (Script hangs after max_execution_time). (Remi)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #71843 (null ptr deref ZEND_RETURN_SPEC_CONST_HANDLER).
|
||||
(Laruence)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #52098 (Own PDOStatement implementation ignore __call()).
|
||||
(Daniel Kalaspuffar, Julien)
|
||||
. Fixed bug #71447 (Quotes inside comments not properly handled). (Matteo)
|
||||
|
||||
- Postgres:
|
||||
. Fixed bug #71820 (pg_fetch_object binds parameters before call
|
||||
constructor). (Anatol)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #67582 (Cloned SplObjectStorage with overwritten getHash fails
|
||||
offsetExists()). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #71840 (Unserialize accepts wrongly data). (Ryat, Laruence)
|
||||
. Fixed bug #67512 (php_crypt() crashes if crypt_r() does not exist or
|
||||
_REENTRANT is not defined). (Nikita)
|
||||
|
||||
- XML:
|
||||
. Fixed bug #72099 (xml_parse_into_struct segmentation fault). (Stas)
|
||||
|
||||
31 Mar 2016, PHP 5.6.20
|
||||
|
||||
- CLI Server:
|
||||
@@ -90,34 +17,35 @@ PHP NEWS
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #71527 (Buffer over-write in finfo_open with malformed magic
|
||||
file). (CVE-2015-8865) (Anatol)
|
||||
file). (Anatol)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #71906 (AddressSanitizer: negative-size-param (-1) in
|
||||
mbfl_strcut). (CVE-2016-4073) (Stas)
|
||||
mbfl_strcut). (Stas)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #47803, #69526 (Executing prepared statements is succesfull only
|
||||
for the first two statements). (einavitamar at gmail dot com, Anatol)
|
||||
. Fixed bug #71860 (Invalid memory write in phar on filename with \0 in
|
||||
name). (CVE-2016-4072) (Stas)
|
||||
name). (Stas)
|
||||
|
||||
- PDO_DBlib:
|
||||
. Fixed bug #54648 (PDO::MSSQL forces format of datetime fields).
|
||||
. Bug #54648 (PDO::MSSQL forces format of datetime fields).
|
||||
(steven dot lambeth at gmx dot de, Anatol)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #71625 (Crash in php7.dll with bad phar filename). (Anatol)
|
||||
. Fixed bug #71625 (Crash in php7.dll with bad phar filename).
|
||||
(Anatol)
|
||||
. Fixed bug #71504 (Parsing of tar file with duplicate filenames causes
|
||||
memory leak). (Jos Elstgeest)
|
||||
|
||||
- SNMP:
|
||||
. Fixed bug #71704 (php_snmp_error() Format String Vulnerability).
|
||||
(CVE-2016-4071) (andrew at jmpesp dot org)
|
||||
(andrew at jmpesp dot org)
|
||||
|
||||
- Standard:
|
||||
- Standard
|
||||
. Fixed bug #71798 (Integer Overflow in php_raw_url_encode).
|
||||
(CVE-2016-4070) (taoguangchen at icloud dot com, Stas)
|
||||
(taoguangchen at icloud dot com, Stas)
|
||||
|
||||
03 Mar 2016, PHP 5.6.19
|
||||
|
||||
@@ -192,19 +120,13 @@ PHP NEWS
|
||||
on the same server). (Anatol)
|
||||
|
||||
- PCRE:
|
||||
. Upgraded bundled PCRE library to 8.38. (CVE-2015-8383, CVE-2015-8386,
|
||||
CVE-2015-8387, CVE-2015-8389, CVE-2015-8390, CVE-2015-8391, CVE-2015-8393,
|
||||
CVE-2015-8394)
|
||||
. Upgraded bundled PCRE library to 8.38.
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #71354 (Heap corruption in tar/zip/phar parser). (CVE-2016-4342)
|
||||
(Stas)
|
||||
. Fixed bug #71331 (Uninitialized pointer in phar_make_dirstream()).
|
||||
(CVE-2016-4343) (Stas)
|
||||
. Fixed bug #71354 (Heap corruption in tar/zip/phar parser). (Stas)
|
||||
. Fixed bug #71391 (NULL Pointer Dereference in phar_tar_setupmetadata()).
|
||||
(Stas)
|
||||
. Fixed bug #71488 (Stack overflow when decompressing tar archives).
|
||||
(CVE-2016-2554) (Stas)
|
||||
. Fixed bug #71488 (Stack overflow when decompressing tar archives). (Stas)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #69111 (Crash in SessionHandler::read()). (Anatol)
|
||||
@@ -237,7 +159,7 @@ PHP NEWS
|
||||
|
||||
- GD:
|
||||
. Fixed bug #70976 (Memory Read via gdImageRotateInterpolated Array Index
|
||||
Out of Bounds). (CVE-2016-1903) (emmanuel dot law at gmail dot com)
|
||||
Out of Bounds). (emmanuel dot law at gmail dot com)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction).
|
||||
@@ -350,10 +272,9 @@ PHP NEWS
|
||||
. Fixed bug #70389 (PDO constructor changes unrelated variables). (Laruence)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #69720 (Null pointer dereference in phar_get_fp_offset()).
|
||||
(CVE-2015-7803) (Stas)
|
||||
. Fixed bug #69720 (Null pointer dereference in phar_get_fp_offset()). (Stas)
|
||||
. FIxed bug #70433 (Uninitialized pointer in phar_make_dirstream when zip
|
||||
entry filename is "/"). (CVE-2015-7804) (Stas)
|
||||
entry filename is "/"). (Stas)
|
||||
|
||||
- Phpdbg:
|
||||
. Fix phpdbg_break_next() sometimes not breaking. (Bob)
|
||||
@@ -375,10 +296,9 @@ PHP NEWS
|
||||
. Fixed bug #69487 (SAPI may truncate POST data). (cmb)
|
||||
. Fixed bug #70198 (Checking liveness does not work as expected).
|
||||
(Shafreeck Sea, Anatol Belski)
|
||||
. Fixed bug #70172 (Use After Free Vulnerability in unserialize()).
|
||||
(CVE-2015-6834) (Stas)
|
||||
. Fixed bug #70172 (Use After Free Vulnerability in unserialize()). (Stas)
|
||||
. Fixed bug #70219 (Use after free vulnerability in session deserializer).
|
||||
(CVE-2015-6835) (taoguangchen at icloud dot com)
|
||||
(taoguangchen at icloud dot com)
|
||||
|
||||
- CLI server:
|
||||
. Fixed bug #66606 (Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE).
|
||||
@@ -418,16 +338,16 @@ PHP NEWS
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #70388 (SOAP serialize_function_call() type confusion / RCE).
|
||||
(CVE-2015-6836) (Stas)
|
||||
(Stas)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #70290 (Null pointer deref (segfault) in spl_autoload via
|
||||
ob_start). (hugh at allthethings dot co dot nz)
|
||||
. Fixed bug #70303 (Incorrect constructor reflection for ArrayObject). (cmb)
|
||||
. Fixed bug #70365 (Use-after-free vulnerability in unserialize() with
|
||||
SplObjectStorage). (CVE-2015-6834) (taoguangchen at icloud dot com)
|
||||
SplObjectStorage). (taoguangchen at icloud dot com)
|
||||
. Fixed bug #70366 (Use-after-free vulnerability in unserialize() with
|
||||
SplDoublyLinkedList). (CVE-2015-6834) (taoguangchen at icloud dot com)
|
||||
SplDoublyLinkedList). (taoguangchen at icloud dot com)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #70052 (getimagesize() fails for very large and very small WBMP).
|
||||
@@ -436,12 +356,11 @@ PHP NEWS
|
||||
INI_SCANNER_TYPED). (Tjerk)
|
||||
|
||||
- XSLT:
|
||||
. Fixed bug #69782 (NULL pointer dereference). (CVE-2015-6837, CVE-2015-6838)
|
||||
(Stas)
|
||||
. Fixed bug #69782 (NULL pointer dereference). (Stas)
|
||||
|
||||
- ZIP:
|
||||
. Fixed bug #70350 (ZipArchive::extractTo allows for directory traversal when
|
||||
creating directories). (CVE-2014-9767) (neal at fb dot com)
|
||||
creating directories). (neal at fb dot com)
|
||||
|
||||
06 Aug 2015, PHP 5.6.12
|
||||
|
||||
@@ -481,12 +400,12 @@ PHP NEWS
|
||||
. Fixed bug #69882 (OpenSSL error "key values mismatch" after
|
||||
openssl_pkcs12_read with extra cert). (Tomasz Sawicki)
|
||||
. Fixed bug #70014 (openssl_random_pseudo_bytes() is not cryptographically
|
||||
secure). (CVE-2015-8867) (Stas)
|
||||
secure). (Stas)
|
||||
|
||||
- Phar:
|
||||
. Improved fix for bug #69441. (Anatol Belski)
|
||||
. Fixed bug #70019 (Files extracted from archive may be placed outside of
|
||||
destination directory). (CVE-2015-6833) (Anatol Belski)
|
||||
destination directory). (Anatol Belski)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #70081 (SoapClient info leak / null pointer dereference via
|
||||
@@ -494,13 +413,13 @@ PHP NEWS
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #70068 (Dangling pointer in the unserialization of ArrayObject
|
||||
items). (CVE-2015-6832) (sean.heelan)
|
||||
items). (sean.heelan)
|
||||
. Fixed bug #70166 (Use After Free Vulnerability in unserialize() with
|
||||
SPLArrayObject). (CVE-2015-6831) (taoguangchen at icloud dot com)
|
||||
SPLArrayObject). (taoguangchen at icloud dot com)
|
||||
. Fixed bug #70168 (Use After Free Vulnerability in unserialize() with
|
||||
SplObjectStorage). (CVE-2015-6831) (taoguangchen at icloud dot com)
|
||||
SplObjectStorage). (taoguangchen at icloud dot com)
|
||||
. Fixed bug #70169 (Use After Free Vulnerability in unserialize() with
|
||||
SplDoublyLinkedList). (CVE-2015-6831) (taoguangchen at icloud dot com)
|
||||
SplDoublyLinkedList). (taoguangchen at icloud dot com)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #70096 (Repeated iptcembed() adds superfluous FF bytes). (cmb)
|
||||
@@ -587,8 +506,7 @@ PHP NEWS
|
||||
on Windows. (Jorge Oliveira, Anatol)
|
||||
. Fixed bug #69646 (OS command injection vulnerability in escapeshellarg).
|
||||
(CVE-2015-4642) (Anatol Belski)
|
||||
. Fixed bug #69719 (Incorrect handling of paths with NULs). (CVE-2015-4598)
|
||||
(Stas)
|
||||
. Fixed bug #69719 (Incorrect handling of paths with NULs). (Stas)
|
||||
|
||||
- FTP
|
||||
. Improved fix for bug #69545 (Integer overflow in ftp_genlist() resulting in
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #69537 (__debugInfo with empty string for key gives error)
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
|
||||
public function __debugInfo(){
|
||||
return ['' => 1];
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(new Foo);
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(Foo)#%d (%d) {
|
||||
[""]=>
|
||||
int(1)
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71841 (EG(error_zval) is not handled well)
|
||||
--INI--
|
||||
error_reporting=0
|
||||
--FILE--
|
||||
<?php
|
||||
$z = unserialize('O:1:"A":0:{}');
|
||||
var_dump($z->e.=0);
|
||||
var_dump(++$z->x);
|
||||
var_dump($z->y++);
|
||||
|
||||
$y = array(PHP_INT_MAX => 0);
|
||||
var_dump($y[] .= 0);
|
||||
var_dump(++$y[]);
|
||||
var_dump($y[]++);
|
||||
?>
|
||||
--EXPECT--
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
+2
-4
@@ -3637,7 +3637,6 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
|
||||
{
|
||||
zend_property_info *child_info;
|
||||
zend_class_entry *parent_ce = ce->parent;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (parent_info->flags & (ZEND_ACC_PRIVATE|ZEND_ACC_SHADOW)) {
|
||||
if (zend_hash_quick_find(&ce->properties_info, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **) &child_info)==SUCCESS) {
|
||||
@@ -3670,8 +3669,7 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
|
||||
if ((child_info->flags & ZEND_ACC_PPP_MASK) > (parent_info->flags & ZEND_ACC_PPP_MASK)) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Access level to %s::$%s must be %s (as in class %s)%s", ce->name, hash_key->arKey, zend_visibility_string(parent_info->flags), parent_ce->name, (parent_info->flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
|
||||
} else if ((child_info->flags & ZEND_ACC_STATIC) == 0) {
|
||||
/* Don't keep default properties in GC (thry may be freed by opcache) */
|
||||
i_zval_ptr_dtor_nogc(ce->default_properties_table[parent_info->offset] ZEND_FILE_LINE_CC TSRMLS_CC);
|
||||
zval_ptr_dtor(&(ce->default_properties_table[parent_info->offset]));
|
||||
ce->default_properties_table[parent_info->offset] = ce->default_properties_table[child_info->offset];
|
||||
ce->default_properties_table[child_info->offset] = NULL;
|
||||
child_info->offset = parent_info->offset;
|
||||
@@ -5404,7 +5402,7 @@ ZEND_API int zend_unmangle_property_name_ex(const char *mangled_property, int le
|
||||
|
||||
*class_name = NULL;
|
||||
|
||||
if (!len || mangled_property[0] != 0) {
|
||||
if (mangled_property[0]!=0) {
|
||||
*prop_name = mangled_property;
|
||||
if (prop_len) {
|
||||
*prop_len = len;
|
||||
|
||||
+1
-1
@@ -2590,7 +2590,7 @@ ZEND_API double zend_hex_strtod(const char *str, const char **endptr)
|
||||
int any = 0;
|
||||
double value = 0;
|
||||
|
||||
if (s[0] == '\0' || s[1] == '\0') {
|
||||
if (strlen(str) < 2) {
|
||||
*endptr = str;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@@ -919,7 +919,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
|
||||
|
||||
pbuffer = (REPARSE_DATA_BUFFER *)do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
|
||||
if (pbuffer == NULL) {
|
||||
CloseHandle(hLink);
|
||||
return -1;
|
||||
}
|
||||
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
|
||||
|
||||
+17
-34
@@ -364,20 +364,13 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -632,20 +625,13 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -745,16 +731,13 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+222
-447
@@ -14540,20 +14540,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14807,20 +14800,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14920,16 +14906,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17070,20 +17053,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17338,20 +17314,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17451,16 +17420,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19187,20 +19153,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19455,20 +19414,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19568,16 +19520,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21410,20 +21359,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22847,20 +22789,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23114,20 +23049,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23227,16 +23155,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24826,20 +24751,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25092,20 +25010,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25205,16 +25116,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26256,20 +26164,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26523,20 +26424,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26636,16 +26530,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27595,20 +27486,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27862,20 +27746,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27975,16 +27852,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28935,20 +28809,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29373,20 +29240,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29639,20 +29499,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29752,16 +29605,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32225,20 +32075,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32491,20 +32334,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32604,16 +32440,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34526,20 +34359,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34793,20 +34619,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34906,16 +34725,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36506,20 +36322,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36773,20 +36582,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36886,16 +36688,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38591,20 +38390,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39879,20 +39671,13 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
|
||||
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
binary_op(*zptr, *zptr, value TSRMLS_CC);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(*zptr);
|
||||
EX_T(opline->result.var).var.ptr = *zptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40145,20 +39930,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
|
||||
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
PZVAL_LOCK(&EG(uninitialized_zval));
|
||||
*retval = &EG(uninitialized_zval);
|
||||
}
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
have_get_ptr = 1;
|
||||
incdec_op(*zptr);
|
||||
if (RETURN_VALUE_USED(opline)) {
|
||||
*retval = *zptr;
|
||||
PZVAL_LOCK(*retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40258,16 +40036,13 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
|
||||
zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, BP_VAR_RW, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
|
||||
if (zptr != NULL) { /* NULL means no success in getting PTR */
|
||||
have_get_ptr = 1;
|
||||
if (UNEXPECTED(*zptr == &EG(error_zval))) {
|
||||
ZVAL_NULL(retval);
|
||||
} else {
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
SEPARATE_ZVAL_IF_NOT_REF(zptr);
|
||||
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
ZVAL_COPY_VALUE(retval, *zptr);
|
||||
zendi_zval_copy_ctor(*retval);
|
||||
|
||||
incdec_op(*zptr);
|
||||
|
||||
incdec_op(*zptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=6
|
||||
PHP_RELEASE_VERSION=22
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_RELEASE_VERSION=20
|
||||
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`
|
||||
|
||||
|
||||
+19
-41
@@ -201,21 +201,6 @@ static void php_str2num(bc_num *num, char *str TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ split_bc_num
|
||||
Convert to bc_num detecting scale */
|
||||
static bc_num split_bc_num(bc_num num) {
|
||||
bc_num newnum;
|
||||
if (num->n_refs >= 1) {
|
||||
return num;
|
||||
}
|
||||
newnum = _bc_new_num_ex(0, 0, 0);
|
||||
*newnum = *num;
|
||||
newnum->n_refs = 1;
|
||||
num->n_refs--;
|
||||
return newnum;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string bcadd(string left_operand, string right_operand [, int scale])
|
||||
Returns the sum of two arbitrary precision numbers */
|
||||
PHP_FUNCTION(bcadd)
|
||||
@@ -229,7 +214,7 @@ PHP_FUNCTION(bcadd)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 3) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
@@ -240,12 +225,11 @@ PHP_FUNCTION(bcadd)
|
||||
php_str2num(&first, left TSRMLS_CC);
|
||||
php_str2num(&second, right TSRMLS_CC);
|
||||
bc_add (first, second, &result, scale);
|
||||
|
||||
|
||||
if (result->n_scale > scale) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale;
|
||||
}
|
||||
|
||||
|
||||
Z_STRVAL_P(return_value) = bc_num2str(result);
|
||||
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
@@ -269,7 +253,7 @@ PHP_FUNCTION(bcsub)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 3) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
@@ -282,7 +266,6 @@ PHP_FUNCTION(bcsub)
|
||||
bc_sub (first, second, &result, scale);
|
||||
|
||||
if (result->n_scale > scale) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale;
|
||||
}
|
||||
|
||||
@@ -309,11 +292,11 @@ PHP_FUNCTION(bcmul)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 3) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
|
||||
|
||||
bc_init_num(&first TSRMLS_CC);
|
||||
bc_init_num(&second TSRMLS_CC);
|
||||
bc_init_num(&result TSRMLS_CC);
|
||||
@@ -322,7 +305,6 @@ PHP_FUNCTION(bcmul)
|
||||
bc_multiply (first, second, &result, scale TSRMLS_CC);
|
||||
|
||||
if (result->n_scale > scale) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale;
|
||||
}
|
||||
|
||||
@@ -349,11 +331,11 @@ PHP_FUNCTION(bcdiv)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 3) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
|
||||
|
||||
bc_init_num(&first TSRMLS_CC);
|
||||
bc_init_num(&second TSRMLS_CC);
|
||||
bc_init_num(&result TSRMLS_CC);
|
||||
@@ -363,7 +345,6 @@ PHP_FUNCTION(bcdiv)
|
||||
switch (bc_divide(first, second, &result, scale TSRMLS_CC)) {
|
||||
case 0: /* OK */
|
||||
if (result->n_scale > scale) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale;
|
||||
}
|
||||
Z_STRVAL_P(return_value) = bc_num2str(result);
|
||||
@@ -393,13 +374,13 @@ PHP_FUNCTION(bcmod)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &left, &left_len, &right, &right_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
bc_init_num(&first TSRMLS_CC);
|
||||
bc_init_num(&second TSRMLS_CC);
|
||||
bc_init_num(&result TSRMLS_CC);
|
||||
bc_str2num(&first, left, 0 TSRMLS_CC);
|
||||
bc_str2num(&second, right, 0 TSRMLS_CC);
|
||||
|
||||
|
||||
switch (bc_modulo(first, second, &result, 0 TSRMLS_CC)) {
|
||||
case 0:
|
||||
Z_STRVAL_P(return_value) = bc_num2str(result);
|
||||
@@ -410,7 +391,7 @@ PHP_FUNCTION(bcmod)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Division by zero");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
bc_free_num(&first);
|
||||
bc_free_num(&second);
|
||||
bc_free_num(&result);
|
||||
@@ -443,9 +424,8 @@ PHP_FUNCTION(bcpowmod)
|
||||
scale_int = (int) ((int)scale < 0) ? 0 : scale;
|
||||
|
||||
if (bc_raisemod(first, second, mod, &result, scale_int TSRMLS_CC) != -1) {
|
||||
if (result->n_scale > scale_int) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale_int;
|
||||
if (result->n_scale > scale) {
|
||||
result->n_scale = scale;
|
||||
}
|
||||
Z_STRVAL_P(return_value) = bc_num2str(result);
|
||||
Z_STRLEN_P(return_value) = strlen(Z_STRVAL_P(return_value));
|
||||
@@ -453,7 +433,7 @@ PHP_FUNCTION(bcpowmod)
|
||||
} else {
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
bc_free_num(&first);
|
||||
bc_free_num(&second);
|
||||
bc_free_num(&mod);
|
||||
@@ -475,7 +455,7 @@ PHP_FUNCTION(bcpow)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 3) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
@@ -488,7 +468,6 @@ PHP_FUNCTION(bcpow)
|
||||
bc_raise (first, second, &result, scale TSRMLS_CC);
|
||||
|
||||
if (result->n_scale > scale) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale;
|
||||
}
|
||||
|
||||
@@ -515,17 +494,16 @@ PHP_FUNCTION(bcsqrt)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "s|l", &left, &left_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 2) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
|
||||
bc_init_num(&result TSRMLS_CC);
|
||||
php_str2num(&result, left TSRMLS_CC);
|
||||
|
||||
|
||||
if (bc_sqrt (&result, scale TSRMLS_CC) != 0) {
|
||||
if (result->n_scale > scale) {
|
||||
result = split_bc_num(result);
|
||||
result->n_scale = scale;
|
||||
}
|
||||
Z_STRVAL_P(return_value) = bc_num2str(result);
|
||||
@@ -553,7 +531,7 @@ PHP_FUNCTION(bccomp)
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (argc == 3) {
|
||||
scale = (int) ((int)scale_param < 0) ? 0 : scale_param;
|
||||
}
|
||||
@@ -577,7 +555,7 @@ PHP_FUNCTION(bccomp)
|
||||
PHP_FUNCTION(bcscale)
|
||||
{
|
||||
long new_scale;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &new_scale) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("bcmath")) print "skip";
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
die('skip valid only for windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcpowmod(1, "A", 128, -200));
|
||||
var_dump(bcpowmod(1, 1.2, 1, 1));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(1) "1"
|
||||
string(3) "0.0"
|
||||
bc math warning: non-zero scale in exponent
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("bcmath")) print "skip";
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
die('skip Not valid for windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bcpowmod(1, "A", 128, -200));
|
||||
var_dump(bcpowmod(1, 1.2, 1, 1));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(1) "1"
|
||||
bc math warning: non-zero scale in exponent
|
||||
string(3) "0.0"
|
||||
@@ -2223,6 +2223,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue TSRMLS_DC)
|
||||
case CURLOPT_CERTINFO:
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
|
||||
case CURLOPT_NOPROXY:
|
||||
case CURLOPT_PROTOCOLS:
|
||||
case CURLOPT_REDIR_PROTOCOLS:
|
||||
case CURLOPT_SOCKS5_GSSAPI_NEC:
|
||||
@@ -2304,7 +2305,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue TSRMLS_DC)
|
||||
case CURLOPT_USERNAME:
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */
|
||||
case CURLOPT_NOPROXY:
|
||||
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
|
||||
|
||||
+644
-796
File diff suppressed because it is too large.
Load diff
+1
-5
@@ -4309,7 +4309,7 @@ static char *date_interval_format(char *format, int format_len, timelib_rel_time
|
||||
char buffer[33];
|
||||
|
||||
if (!format_len) {
|
||||
return STR_EMPTY_ALLOC();
|
||||
return estrdup("");
|
||||
}
|
||||
|
||||
for (i = 0; i < format_len; i++) {
|
||||
@@ -4359,10 +4359,6 @@ static char *date_interval_format(char *format, int format_len, timelib_rel_time
|
||||
|
||||
smart_str_0(&string);
|
||||
|
||||
if (string.c == NULL) {
|
||||
return STR_EMPTY_ALLOC();
|
||||
}
|
||||
|
||||
return string.c;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71889 (DateInterval::format segfault on '%' input)
|
||||
--INI--
|
||||
date.timezone=US/Eastern
|
||||
--FILE--
|
||||
<?php
|
||||
$di = new DateInterval('P1D');
|
||||
var_dump($di->format("%"));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(0) ""
|
||||
+2
-15
@@ -2955,7 +2955,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
/* When there are any characters after the first NUL */
|
||||
ImageInfo->CopyrightPhotographer = estrdup(value_ptr);
|
||||
ImageInfo->CopyrightEditor = estrndup(value_ptr+length+1, byte_count-length-1);
|
||||
spprintf(&ImageInfo->Copyright, 0, "%s, %s", ImageInfo->CopyrightPhotographer, ImageInfo->CopyrightEditor);
|
||||
spprintf(&ImageInfo->Copyright, 0, "%s, %s", value_ptr, value_ptr+length+1);
|
||||
/* format = TAG_FMT_UNDEFINED; this musn't be ASCII */
|
||||
/* but we are not supposed to change this */
|
||||
/* keep in mind that image_info does not store editor value */
|
||||
@@ -3124,11 +3124,6 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start,
|
||||
|
||||
ImageInfo->sections_found |= FOUND_IFD0;
|
||||
|
||||
if ((dir_start + 2) >= (offset_base+IFDlength)) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
NumDirEntries = php_ifd_get16u(dir_start, ImageInfo->motorola_intel);
|
||||
|
||||
if ((dir_start+2+NumDirEntries*12) > (offset_base+IFDlength)) {
|
||||
@@ -3152,10 +3147,6 @@ static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start,
|
||||
* Hack to make it process IDF1 I hope
|
||||
* There are 2 IDFs, the second one holds the keys (0x0201 and 0x0202) to the thumbnail
|
||||
*/
|
||||
if ((dir_start+2+12*de + 4) >= (offset_base+IFDlength)) {
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD size");
|
||||
return FALSE;
|
||||
}
|
||||
NextDirOffset = php_ifd_get32u(dir_start+2+12*de, ImageInfo->motorola_intel);
|
||||
if (NextDirOffset) {
|
||||
/* the next line seems false but here IFDlength means length of all IFDs */
|
||||
@@ -3205,13 +3196,9 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf,
|
||||
}
|
||||
|
||||
/* Check the next two values for correctness. */
|
||||
if (length < 8) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Invalid TIFF start (1)");
|
||||
return;
|
||||
}
|
||||
exif_value_2a = php_ifd_get16u(CharBuf+2, ImageInfo->motorola_intel);
|
||||
offset_of_ifd = php_ifd_get32u(CharBuf+4, ImageInfo->motorola_intel);
|
||||
if (exif_value_2a != 0x2a || offset_of_ifd < 0x08) {
|
||||
if ( exif_value_2a != 0x2a || offset_of_ifd < 0x08) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Invalid TIFF start (1)");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
--TEST--
|
||||
Bug #72094: Out of bounds heap read access in exif header processing
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
print_r(exif_read_data(__DIR__ . '/bug72094_1.jpg'));
|
||||
print_r(exif_read_data(__DIR__ . '/bug72094_2.jpg'));
|
||||
print_r(exif_read_data(__DIR__ . '/bug72094_3.jpg'));
|
||||
print_r(exif_read_data(__DIR__ . '/bug72094_4.jpg'));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Process tag(x8298=Copyright ): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Illegal IFD offset in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): File structure corrupted in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_1.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_2.jpg): Illegal IFD size in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_2.jpg): File structure corrupted in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_2.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Illegal IFD size in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): File structure corrupted in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_3.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_4.jpg): Invalid TIFF start (1) in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_4.jpg): File structure corrupted in %s%ebug72094.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug72094_4.jpg): Invalid JPEG file in %s%ebug72094.php on line %d
|
||||
DONE
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -414,7 +414,7 @@ file_check_mem(struct magic_set *ms, unsigned int level)
|
||||
size_t len;
|
||||
|
||||
if (level >= ms->c.len) {
|
||||
len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
|
||||
len = (ms->c.len += 20 + level) * sizeof(*ms->c.li);
|
||||
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
|
||||
emalloc(len) :
|
||||
erealloc(ms->c.li, len));
|
||||
|
||||
+2
-9
@@ -5362,15 +5362,8 @@ PHP_FUNCTION(imageaffinematrixget)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number is expected as option");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if(Z_TYPE_P(options) != IS_DOUBLE) {
|
||||
zval dval;
|
||||
dval = *options;
|
||||
zval_copy_ctor(&dval);
|
||||
convert_to_double(&dval);
|
||||
angle = Z_DVAL(dval);
|
||||
} else {
|
||||
angle = Z_DVAL_P(options);
|
||||
}
|
||||
convert_to_double_ex(&options);
|
||||
angle = Z_DVAL_P(options);
|
||||
|
||||
if (type == GD_AFFINE_SHEAR_HORIZONTAL) {
|
||||
res = gdAffineShearHorizontal(affine, angle);
|
||||
|
||||
@@ -145,15 +145,9 @@ static int _gd2GetHeader(gdIOCtxPtr in, int *sx, int *sy, int *cs, int *vers, in
|
||||
cidx = gdCalloc(sidx, 1);
|
||||
for (i = 0; i < nc; i++) {
|
||||
if (gdGetInt(&cidx[i].offset, in) != 1) {
|
||||
gdFree(cidx);
|
||||
goto fail1;
|
||||
}
|
||||
if (gdGetInt(&cidx[i].size, in) != 1) {
|
||||
gdFree(cidx);
|
||||
goto fail1;
|
||||
}
|
||||
if (cidx[i].offset < 0 || cidx[i].size < 0) {
|
||||
gdFree(cidx);
|
||||
goto fail1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71912 (libgd: signedness vulnerability)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
if(!function_exists('imagecreatefromgd2')) die('skip imagecreatefromgd2() not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . "invalid_neg_size.gd2");
|
||||
?>
|
||||
OK
|
||||
--EXPECTF--
|
||||
|
||||
Warning: imagecreatefromgd2(): '%s%einvalid_neg_size.gd2' is not a valid GD2 file in %s%ebug71912.php on line %d
|
||||
OK
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71952 (Corruption inside imageaffinematrixget)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$vals=[str_repeat("A","200"),0,1,2,3,4,5,6,7,8,9];
|
||||
imageaffinematrixget(4,$vals[0]);
|
||||
var_dump($vals[0]);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(200) "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
||||
Binary file not shown.
@@ -18,7 +18,7 @@ try {
|
||||
} catch (Exception $e) { var_dump($e->getMessage()); }
|
||||
|
||||
try {
|
||||
unserialize('C:3:"GMP":8:{s:2:"42";}');
|
||||
unserialize('C:3:"GMP":8:{s:2:"42"}');
|
||||
} catch (Exception $e) { var_dump($e->getMessage()); }
|
||||
|
||||
?>
|
||||
|
||||
@@ -112,7 +112,7 @@ PHP_FUNCTION(grapheme_strpos)
|
||||
int haystack_len, needle_len;
|
||||
unsigned char *found;
|
||||
long loffset = 0;
|
||||
int32_t offset = 0, noffset = 0;
|
||||
int32_t offset = 0;
|
||||
int ret_pos;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", (char **)&haystack, &haystack_len, (char **)&needle, &needle_len, &loffset) == FAILURE) {
|
||||
@@ -132,7 +132,6 @@ PHP_FUNCTION(grapheme_strpos)
|
||||
|
||||
/* we checked that it will fit: */
|
||||
offset = (int32_t) loffset;
|
||||
noffset = offset >= 0 ? offset : haystack_len + offset;
|
||||
|
||||
/* the offset is 'grapheme count offset' so it still might be invalid - we'll check it later */
|
||||
|
||||
@@ -147,7 +146,7 @@ PHP_FUNCTION(grapheme_strpos)
|
||||
/* quick check to see if the string might be there
|
||||
* I realize that 'offset' is 'grapheme count offset' but will work in spite of that
|
||||
*/
|
||||
found = (unsigned char *)php_memnstr((char *)haystack + noffset, (char *)needle, needle_len, (char *)haystack + haystack_len);
|
||||
found = (unsigned char *)php_memnstr((char *)haystack + offset, (char *)needle, needle_len, (char *)haystack + haystack_len);
|
||||
|
||||
/* if it isn't there the we are done */
|
||||
if (!found) {
|
||||
@@ -215,13 +214,12 @@ PHP_FUNCTION(grapheme_stripos)
|
||||
is_ascii = ( grapheme_ascii_check(haystack, haystack_len) >= 0 );
|
||||
|
||||
if ( is_ascii ) {
|
||||
int32_t noffset = offset >= 0 ? offset : haystack_len + offset;
|
||||
needle_dup = (unsigned char *)estrndup((char *)needle, needle_len);
|
||||
php_strtolower((char *)needle_dup, needle_len);
|
||||
haystack_dup = (unsigned char *)estrndup((char *)haystack, haystack_len);
|
||||
php_strtolower((char *)haystack_dup, haystack_len);
|
||||
|
||||
found = (unsigned char*) php_memnstr((char *)haystack_dup + noffset, (char *)needle_dup, needle_len, (char *)haystack_dup + haystack_len);
|
||||
found = (unsigned char*) php_memnstr((char *)haystack_dup + offset, (char *)needle_dup, needle_len, (char *)haystack_dup + haystack_len);
|
||||
|
||||
efree(haystack_dup);
|
||||
efree(needle_dup);
|
||||
@@ -539,7 +537,7 @@ PHP_FUNCTION(grapheme_substr)
|
||||
efree(ustr);
|
||||
}
|
||||
ubrk_close(bi);
|
||||
RETURN_EMPTY_STRING();
|
||||
RETURN_EMPTY_STRING();
|
||||
}
|
||||
|
||||
/* find the end point of the string to return */
|
||||
@@ -578,7 +576,7 @@ PHP_FUNCTION(grapheme_substr)
|
||||
sub_str_end_pos = ustr_len;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(sub_str_start_pos > sub_str_end_pos) {
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "grapheme_substr: length is beyond start", 1 TSRMLS_CC );
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #72061: Out-of-bounds reads in zif_grapheme_stripos with negative offset
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(grapheme_stripos(str_repeat("ABCD", 16384), "A", -201));
|
||||
var_dump(grapheme_strpos(str_repeat("ABCD", 16384), "A", -201));
|
||||
?>
|
||||
DONE
|
||||
--EXPECT--
|
||||
int(65336)
|
||||
int(65336)
|
||||
DONE
|
||||
@@ -4,11 +4,11 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 2013 Zend Technologies Ltd. (http://www.zend.com) |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| This source file is subject to version 3.01 of the Zend license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| http://www.zend.com/license/3_01.txt. |
|
||||
| If you did not receive a copy of the Zend license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@zend.com so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
@@ -1145,9 +1145,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
|
||||
return 1;
|
||||
}
|
||||
convert_to_long(var);
|
||||
|
||||
#if defined(OCI_MAJOR_VERSION) && (OCI_MAJOR_VERSION > 10) && \
|
||||
(defined(__x86_64__) || defined(__LP64__) || defined(_LP64) || defined(_WIN64))
|
||||
#if defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION > 10
|
||||
bind_data = (ub8 *)&Z_LVAL_P(var);
|
||||
value_sz = sizeof(ub8);
|
||||
#else
|
||||
|
||||
+5
-21
@@ -9,7 +9,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
|
||||
|
||||
<description>
|
||||
Use the OCI8 extension to access Oracle Database. PHP OCI8 2.1 builds
|
||||
with PHP 7. Use 'pecl install oci8-2.0.11' to install OCI8 for PHP
|
||||
with PHP 7. Use 'pecl install oci8-2.0.10' to install OCI8 for PHP
|
||||
5.2 - PHP 5.6. Use 'pecl install oci8-1.4.10' to install PHP OCI8 1.4
|
||||
for PHP 4.3.9 - PHP 5.1. The OCI8 extension can be linked with Oracle
|
||||
client libraries from Oracle Database 12.1, 11, or 10.2. These
|
||||
@@ -46,12 +46,12 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
<active>no</active>
|
||||
</lead>
|
||||
|
||||
<date>2016-04-15</date>
|
||||
<date>2015-12-12</date>
|
||||
<time>12:00:00</time>
|
||||
|
||||
<version>
|
||||
<release>2.0.11</release>
|
||||
<api>2.0.11</api>
|
||||
<release>2.0.10</release>
|
||||
<api>2.0.10</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
@@ -59,7 +59,7 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column)
|
||||
Fixed bug #68298 (OCI int overflow)
|
||||
</notes>
|
||||
<contents>
|
||||
<dir name="/">
|
||||
@@ -159,7 +159,6 @@ Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed f
|
||||
<file name="bug51291_1.phpt" role="test" />
|
||||
<file name="bug51291_2.phpt" role="test" />
|
||||
<file name="bug68298.phpt" role="test" />
|
||||
<file name="bug71422.phpt" role="test" />
|
||||
<file name="clientversion.phpt" role="test" />
|
||||
<file name="close.phpt" role="test" />
|
||||
<file name="coll_001.phpt" role="test" />
|
||||
@@ -465,21 +464,6 @@ Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed f
|
||||
</extsrcrelease>
|
||||
<changelog>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.0.10</release>
|
||||
<api>2.0.10</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
Fixed bug #68298 (OCI int overflow)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.0.9</release>
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
*/
|
||||
#undef PHP_OCI8_VERSION
|
||||
#endif
|
||||
#define PHP_OCI8_VERSION "2.0.11"
|
||||
#define PHP_OCI8_VERSION "2.0.10"
|
||||
|
||||
extern zend_module_entry oci8_module_entry;
|
||||
#define phpext_oci8_ptr &oci8_module_entry
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__).'/connect.inc');
|
||||
|
||||
$stmtarray = array(
|
||||
"DROP TABLE BUG71422_TEST",
|
||||
"CREATE TABLE BUG71422_TEST (TEST_ID NUMBER(*,0) NOT NULL, LABEL VARCHAR2(50 CHAR), CONSTRAINT BUG71422_TEST_PK PRIMARY KEY (TEST_ID))",
|
||||
"INSERT INTO BUG71422_TEST (TEST_ID, LABEL) VALUES (1, 'Foo')"
|
||||
);
|
||||
|
||||
oci8_test_sql_execute($c, $stmtarray);
|
||||
|
||||
$stmt = oci_parse($c, 'SELECT LABEL AS RAW_QUERY FROM BUG71422_TEST WHERE TEST_ID=1');
|
||||
oci_execute($stmt);
|
||||
while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
|
||||
var_dump($row);
|
||||
}
|
||||
|
||||
$stmt = oci_parse($c, 'SELECT LABEL AS NUMERIC_BIND_PARAMETER FROM BUG71422_TEST WHERE TEST_ID=:test_id');
|
||||
$value = 1;
|
||||
oci_bind_by_name($stmt, ':test_id', $value, -1, SQLT_INT);
|
||||
oci_execute($stmt);
|
||||
while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
|
||||
var_dump($row);
|
||||
}
|
||||
|
||||
$stmt = oci_parse($c, 'SELECT LABEL AS STRING_BIND_PARAMETER FROM BUG71422_TEST WHERE TEST_ID=:test_id');
|
||||
$value = 1;
|
||||
oci_bind_by_name($stmt, ':test_id', $value, -1, SQLT_CHR);
|
||||
oci_execute($stmt);
|
||||
while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
|
||||
var_dump($row);
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
||||
$stmtarray = array(
|
||||
"DROP TABLE BUG71422_TEST"
|
||||
);
|
||||
oci8_test_sql_execute($c, $stmtarray);
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
<?php exit(0); ?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
["RAW_QUERY"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
array(1) {
|
||||
["NUMERIC_BIND_PARAMETER"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
array(1) {
|
||||
["STRING_BIND_PARAMETER"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
===DONE===
|
||||
+7
-14
@@ -431,8 +431,7 @@ static void _free_odbc_result(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
efree(res->values);
|
||||
res->values = NULL;
|
||||
}
|
||||
/* If aborted via timer expiration, don't try to call any unixODBC function */
|
||||
if (res->stmt && !(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
|
||||
if (res->stmt) {
|
||||
#if defined(HAVE_SOLID) || defined(HAVE_SOLID_30) || defined(HAVE_SOLID_35)
|
||||
SQLTransact(res->conn_ptr->henv, res->conn_ptr->hdbc,
|
||||
(SQLUSMALLINT) SQL_COMMIT);
|
||||
@@ -488,12 +487,9 @@ static void _close_odbc_conn(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
/* If aborted via timer expiration, don't try to call any unixODBC function */
|
||||
if (!(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
|
||||
safe_odbc_disconnect(conn->hdbc);
|
||||
SQLFreeConnect(conn->hdbc);
|
||||
SQLFreeEnv(conn->henv);
|
||||
}
|
||||
safe_odbc_disconnect(conn->hdbc);
|
||||
SQLFreeConnect(conn->hdbc);
|
||||
SQLFreeEnv(conn->henv);
|
||||
efree(conn);
|
||||
ODBCG(num_links)--;
|
||||
}
|
||||
@@ -519,12 +515,9 @@ static void _close_odbc_pconn(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
}
|
||||
}
|
||||
|
||||
/* If aborted via timer expiration, don't try to call any unixODBC function */
|
||||
if (!(PG(connection_status) & PHP_CONNECTION_TIMEOUT)) {
|
||||
safe_odbc_disconnect(conn->hdbc);
|
||||
SQLFreeConnect(conn->hdbc);
|
||||
SQLFreeEnv(conn->henv);
|
||||
}
|
||||
safe_odbc_disconnect(conn->hdbc);
|
||||
SQLFreeConnect(conn->hdbc);
|
||||
SQLFreeEnv(conn->henv);
|
||||
free(conn);
|
||||
|
||||
ODBCG(num_links)--;
|
||||
|
||||
@@ -716,11 +716,8 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
|
||||
if (src->opcode == ZEND_BOOL) {
|
||||
if (ZEND_OP1_TYPE(src) == IS_CONST) {
|
||||
literal_dtor(&ZEND_OP1_LITERAL(src));
|
||||
} else if (ZEND_OP1_TYPE(src) == IS_TMP_VAR) {
|
||||
src->opcode = ZEND_FREE;
|
||||
} else {
|
||||
MAKE_NOP(src);
|
||||
}
|
||||
MAKE_NOP(src);
|
||||
MAKE_NOP(opline);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,11 +482,7 @@ static inline void accel_restart_enter(TSRMLS_D)
|
||||
#ifdef ZEND_WIN32
|
||||
INCREMENT(restart_in);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
|
||||
#endif
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &restart_in_progress) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(+1): %s (%d)", strerror(errno), errno);
|
||||
@@ -501,11 +497,7 @@ static inline void accel_restart_leave(TSRMLS_D)
|
||||
ZCSG(restart_in_progress) = 0;
|
||||
DECREMENT(restart_in);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
|
||||
# endif
|
||||
|
||||
ZCSG(restart_in_progress) = 0;
|
||||
if (fcntl(lock_file, F_SETLK, &restart_finished) == -1) {
|
||||
@@ -543,11 +535,7 @@ static inline void accel_activate_add(TSRMLS_D)
|
||||
#ifdef ZEND_WIN32
|
||||
INCREMENT(mem_usage);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
|
||||
# endif
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &mem_usage_lock) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(+1): %s (%d)", strerror(errno), errno);
|
||||
@@ -564,11 +552,7 @@ static inline void accel_deactivate_sub(TSRMLS_D)
|
||||
ZCG(counted) = 0;
|
||||
}
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
|
||||
# endif
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &mem_usage_unlock) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(-1): %s (%d)", strerror(errno), errno);
|
||||
@@ -581,11 +565,7 @@ static inline void accel_unlock_all(TSRMLS_D)
|
||||
#ifdef ZEND_WIN32
|
||||
accel_deactivate_sub(TSRMLS_C);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
|
||||
# endif
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &mem_usage_unlock_all) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UnlockAll: %s (%d)", strerror(errno), errno);
|
||||
|
||||
@@ -359,7 +359,7 @@ AC_TRY_RUN([
|
||||
AC_MSG_RESULT("yes")
|
||||
], AC_MSG_RESULT("no") )
|
||||
|
||||
if test "$flock_type" = "unknown"; then
|
||||
if test "$flock_type" == "unknown"; then
|
||||
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71843 (null ptr deref ZEND_RETURN_SPEC_CONST_HANDLER (zend_vm_execute.h:3479))
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=0xFFFFBFFF
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('Zend OPcache')) die("skip"); ?>
|
||||
--FILE--
|
||||
<?
|
||||
0 & ~E & ~R;
|
||||
6 && ~See
|
||||
?>
|
||||
okey
|
||||
--EXPECTF--
|
||||
Notice: Use of undefined constant E - assumed 'E' in %sbug71843.php on line %d
|
||||
|
||||
Notice: Use of undefined constant R - assumed 'R' in %sbug71843.php on line %d
|
||||
|
||||
Notice: Use of undefined constant See - assumed 'See' in %sbug71843.php on line %d
|
||||
okey
|
||||
@@ -1348,12 +1348,18 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
|
||||
}
|
||||
|
||||
static union _zend_function *dbh_method_get(
|
||||
#if PHP_API_VERSION >= 20041225
|
||||
zval **object_pp,
|
||||
#else
|
||||
zval *object,
|
||||
#endif
|
||||
char *method_name, int method_len, const zend_literal *key TSRMLS_DC)
|
||||
{
|
||||
zend_function *fbc = NULL;
|
||||
char *lc_method_name;
|
||||
#if PHP_API_VERSION >= 20041225
|
||||
zval *object = *object_pp;
|
||||
#endif
|
||||
pdo_dbh_t *dbh = zend_object_store_get_object(object TSRMLS_CC);
|
||||
|
||||
lc_method_name = emalloc(method_len + 1);
|
||||
|
||||
+135
-91
@@ -54,6 +54,7 @@ static int scan(Scanner *s)
|
||||
#line 55 "ext/pdo/pdo_sql_parser.c"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
|
||||
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
||||
yych = *YYCURSOR;
|
||||
@@ -61,32 +62,31 @@ static int scan(Scanner *s)
|
||||
case 0x00: goto yy2;
|
||||
case '"': goto yy3;
|
||||
case '\'': goto yy5;
|
||||
case '(':
|
||||
case ')':
|
||||
case '*':
|
||||
case '+':
|
||||
case ',':
|
||||
case '.': goto yy9;
|
||||
case '-': goto yy10;
|
||||
case '/': goto yy11;
|
||||
case '-': goto yy11;
|
||||
case '/': goto yy9;
|
||||
case ':': goto yy6;
|
||||
case '?': goto yy7;
|
||||
default: goto yy12;
|
||||
}
|
||||
yy2:
|
||||
YYCURSOR = YYMARKER;
|
||||
goto yy4;
|
||||
switch (yyaccept) {
|
||||
case 0: goto yy4;
|
||||
case 1: goto yy10;
|
||||
}
|
||||
yy3:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych >= 0x01) goto yy37;
|
||||
if (yych >= 0x01) goto yy43;
|
||||
yy4:
|
||||
#line 63 "ext/pdo/pdo_sql_parser.re"
|
||||
{ SKIP_ONE(PDO_PARSER_TEXT); }
|
||||
#line 86 "ext/pdo/pdo_sql_parser.c"
|
||||
#line 85 "ext/pdo/pdo_sql_parser.c"
|
||||
yy5:
|
||||
yyaccept = 0;
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych <= 0x00) goto yy4;
|
||||
goto yy32;
|
||||
goto yy38;
|
||||
yy6:
|
||||
yych = *++YYCURSOR;
|
||||
switch (yych) {
|
||||
@@ -152,14 +152,14 @@ yy6:
|
||||
case 'w':
|
||||
case 'x':
|
||||
case 'y':
|
||||
case 'z': goto yy26;
|
||||
case ':': goto yy29;
|
||||
case 'z': goto yy32;
|
||||
case ':': goto yy35;
|
||||
default: goto yy4;
|
||||
}
|
||||
yy7:
|
||||
++YYCURSOR;
|
||||
switch ((yych = *YYCURSOR)) {
|
||||
case '?': goto yy23;
|
||||
case '?': goto yy29;
|
||||
default: goto yy8;
|
||||
}
|
||||
yy8:
|
||||
@@ -167,89 +167,133 @@ yy8:
|
||||
{ RET(PDO_PARSER_BIND_POS); }
|
||||
#line 169 "ext/pdo/pdo_sql_parser.c"
|
||||
yy9:
|
||||
yych = *++YYCURSOR;
|
||||
goto yy4;
|
||||
yy10:
|
||||
yych = *++YYCURSOR;
|
||||
switch (yych) {
|
||||
case '-': goto yy21;
|
||||
default: goto yy4;
|
||||
++YYCURSOR;
|
||||
switch ((yych = *YYCURSOR)) {
|
||||
case '*': goto yy19;
|
||||
default: goto yy13;
|
||||
}
|
||||
yy10:
|
||||
#line 65 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_TEXT); }
|
||||
#line 179 "ext/pdo/pdo_sql_parser.c"
|
||||
yy11:
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
switch (yych) {
|
||||
case '*': goto yy15;
|
||||
default: goto yy4;
|
||||
case '-': goto yy14;
|
||||
default: goto yy13;
|
||||
}
|
||||
yy12:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
yy13:
|
||||
switch (yych) {
|
||||
case 0x00:
|
||||
case '"':
|
||||
case '\'':
|
||||
case ':':
|
||||
case '?': goto yy10;
|
||||
default: goto yy12;
|
||||
}
|
||||
yy14:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case 0x00:
|
||||
case '"':
|
||||
case '\'':
|
||||
case '(':
|
||||
case ')':
|
||||
case '*':
|
||||
case '+':
|
||||
case ',':
|
||||
case '-':
|
||||
case '.':
|
||||
case '/':
|
||||
case ':':
|
||||
case '?': goto yy14;
|
||||
default: goto yy12;
|
||||
case '?': goto yy17;
|
||||
case '\n':
|
||||
case '\r': goto yy12;
|
||||
default: goto yy14;
|
||||
}
|
||||
yy14:
|
||||
#line 65 "ext/pdo/pdo_sql_parser.re"
|
||||
yy16:
|
||||
#line 64 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_TEXT); }
|
||||
#line 208 "ext/pdo/pdo_sql_parser.c"
|
||||
yy15:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case '*': goto yy17;
|
||||
default: goto yy15;
|
||||
}
|
||||
#line 216 "ext/pdo/pdo_sql_parser.c"
|
||||
yy17:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case '*': goto yy17;
|
||||
case '/': goto yy19;
|
||||
default: goto yy15;
|
||||
case '\n':
|
||||
case '\r': goto yy16;
|
||||
default: goto yy17;
|
||||
}
|
||||
yy19:
|
||||
++YYCURSOR;
|
||||
yy20:
|
||||
#line 64 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_TEXT); }
|
||||
#line 231 "ext/pdo/pdo_sql_parser.c"
|
||||
yyaccept = 1;
|
||||
YYMARKER = ++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case 0x00:
|
||||
case '"':
|
||||
case '\'':
|
||||
case ':':
|
||||
case '?': goto yy21;
|
||||
case '*': goto yy23;
|
||||
default: goto yy19;
|
||||
}
|
||||
yy21:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case '\n':
|
||||
case '\r': goto yy20;
|
||||
case '*': goto yy26;
|
||||
default: goto yy21;
|
||||
}
|
||||
yy23:
|
||||
yyaccept = 1;
|
||||
YYMARKER = ++YYCURSOR;
|
||||
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case 0x00:
|
||||
case '"':
|
||||
case '\'':
|
||||
case ':':
|
||||
case '?': goto yy21;
|
||||
case '*': goto yy23;
|
||||
case '/': goto yy25;
|
||||
default: goto yy19;
|
||||
}
|
||||
yy25:
|
||||
yych = *++YYCURSOR;
|
||||
switch (yych) {
|
||||
case 0x00:
|
||||
case '"':
|
||||
case '\'':
|
||||
case ':':
|
||||
case '?': goto yy16;
|
||||
default: goto yy12;
|
||||
}
|
||||
yy26:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case '?': goto yy23;
|
||||
default: goto yy25;
|
||||
case '*': goto yy26;
|
||||
case '/': goto yy28;
|
||||
default: goto yy21;
|
||||
}
|
||||
yy25:
|
||||
yy28:
|
||||
yych = *++YYCURSOR;
|
||||
goto yy16;
|
||||
yy29:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case '?': goto yy29;
|
||||
default: goto yy31;
|
||||
}
|
||||
yy31:
|
||||
#line 60 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_TEXT); }
|
||||
#line 252 "ext/pdo/pdo_sql_parser.c"
|
||||
yy26:
|
||||
#line 296 "ext/pdo/pdo_sql_parser.c"
|
||||
yy32:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
@@ -316,65 +360,65 @@ yy26:
|
||||
case 'w':
|
||||
case 'x':
|
||||
case 'y':
|
||||
case 'z': goto yy26;
|
||||
default: goto yy28;
|
||||
case 'z': goto yy32;
|
||||
default: goto yy34;
|
||||
}
|
||||
yy28:
|
||||
yy34:
|
||||
#line 61 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_BIND); }
|
||||
#line 326 "ext/pdo/pdo_sql_parser.c"
|
||||
yy29:
|
||||
#line 370 "ext/pdo/pdo_sql_parser.c"
|
||||
yy35:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
switch (yych) {
|
||||
case ':': goto yy29;
|
||||
default: goto yy25;
|
||||
}
|
||||
yy31:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
yy32:
|
||||
switch (yych) {
|
||||
case 0x00: goto yy2;
|
||||
case '\'': goto yy34;
|
||||
case '\\': goto yy33;
|
||||
case ':': goto yy35;
|
||||
default: goto yy31;
|
||||
}
|
||||
yy33:
|
||||
yy37:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
yy38:
|
||||
switch (yych) {
|
||||
case 0x00: goto yy2;
|
||||
case '\'': goto yy40;
|
||||
case '\\': goto yy39;
|
||||
default: goto yy37;
|
||||
}
|
||||
yy39:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
if (yych <= 0x00) goto yy2;
|
||||
goto yy31;
|
||||
yy34:
|
||||
goto yy37;
|
||||
yy40:
|
||||
++YYCURSOR;
|
||||
#line 59 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_TEXT); }
|
||||
#line 356 "ext/pdo/pdo_sql_parser.c"
|
||||
yy36:
|
||||
#line 400 "ext/pdo/pdo_sql_parser.c"
|
||||
yy42:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
yy37:
|
||||
yy43:
|
||||
switch (yych) {
|
||||
case 0x00: goto yy2;
|
||||
case '"': goto yy39;
|
||||
case '\\': goto yy38;
|
||||
default: goto yy36;
|
||||
case '"': goto yy45;
|
||||
case '\\': goto yy44;
|
||||
default: goto yy42;
|
||||
}
|
||||
yy38:
|
||||
yy44:
|
||||
++YYCURSOR;
|
||||
if (YYLIMIT <= YYCURSOR) YYFILL(1);
|
||||
yych = *YYCURSOR;
|
||||
if (yych <= 0x00) goto yy2;
|
||||
goto yy36;
|
||||
yy39:
|
||||
goto yy42;
|
||||
yy45:
|
||||
++YYCURSOR;
|
||||
#line 58 "ext/pdo/pdo_sql_parser.re"
|
||||
{ RET(PDO_PARSER_TEXT); }
|
||||
#line 378 "ext/pdo/pdo_sql_parser.c"
|
||||
#line 422 "ext/pdo/pdo_sql_parser.c"
|
||||
}
|
||||
#line 66 "ext/pdo/pdo_sql_parser.re"
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ static int scan(Scanner *s)
|
||||
BINDCHR = [:][a-zA-Z0-9_]+;
|
||||
QUESTION = [?];
|
||||
COMMENTS = ("/*"([^*]+|[*]+[^/*])*[*]*"*/"|"--"[^\r\n]*);
|
||||
SPECIALS = [:?"'-/];
|
||||
SPECIALS = [:?"'];
|
||||
MULTICHAR = ([:]{2,}|[?]{2,});
|
||||
ANYNOEOF = [\001-\377];
|
||||
*/
|
||||
|
||||
+88
-79
@@ -145,7 +145,7 @@ static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_pa
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined" TSRMLS_CC);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
zend_hash_internal_pointer_reset(stmt->bound_param_map);
|
||||
while (SUCCESS == zend_hash_get_current_data(stmt->bound_param_map, (void**)&name)) {
|
||||
if (strcmp(name, param->name)) {
|
||||
@@ -163,7 +163,7 @@ static inline int rewrite_name_to_position(pdo_stmt_t *stmt, struct pdo_bound_pa
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined" TSRMLS_CC);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -188,7 +188,7 @@ iterate:
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
zend_hash_move_forward(ht);
|
||||
}
|
||||
}
|
||||
@@ -442,14 +442,14 @@ static PHP_METHOD(PDOStatement, execute)
|
||||
}
|
||||
|
||||
PDO_STMT_CLEAR_ERR();
|
||||
|
||||
|
||||
if (input_params) {
|
||||
struct pdo_bound_param_data param;
|
||||
zval **tmp;
|
||||
uint str_length;
|
||||
ulong num_index;
|
||||
|
||||
if (stmt->bound_params) {
|
||||
|
||||
if (stmt->bound_params) {
|
||||
zend_hash_destroy(stmt->bound_params);
|
||||
FREE_HASHTABLE(stmt->bound_params);
|
||||
stmt->bound_params = NULL;
|
||||
@@ -490,7 +490,7 @@ static PHP_METHOD(PDOStatement, execute)
|
||||
|
||||
if (PDO_PLACEHOLDER_NONE == stmt->supports_placeholders) {
|
||||
/* handle the emulated parameter binding,
|
||||
* stmt->active_query_string holds the query with binds expanded and
|
||||
* stmt->active_query_string holds the query with binds expanded and
|
||||
* quoted.
|
||||
*/
|
||||
|
||||
@@ -531,7 +531,7 @@ static PHP_METHOD(PDOStatement, execute)
|
||||
if (ret && !dispatch_param_event(stmt, PDO_PARAM_EVT_EXEC_POST TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
RETURN_BOOL(ret);
|
||||
}
|
||||
if (stmt->active_query_string && stmt->active_query_string != stmt->query_string) {
|
||||
@@ -569,12 +569,12 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
|
||||
} else {
|
||||
ZVAL_NULL(dest);
|
||||
}
|
||||
|
||||
|
||||
if (Z_TYPE_P(dest) == IS_NULL) {
|
||||
type = new_type;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case PDO_PARAM_INT:
|
||||
if (value && value_len == sizeof(long)) {
|
||||
ZVAL_LONG(dest, *(long*)value);
|
||||
@@ -635,7 +635,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case PDO_PARAM_STR:
|
||||
if (value && !(value_len == 0 && stmt->dbh->oracle_nulls == PDO_NULL_EMPTY_STRING)) {
|
||||
ZVAL_STRINGL(dest, value, value_len, !caller_frees);
|
||||
@@ -666,7 +666,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (caller_frees && value) {
|
||||
efree(value);
|
||||
}
|
||||
@@ -705,7 +705,7 @@ static int do_fetch_common(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori,
|
||||
if (!stmt->columns && !pdo_stmt_describe_columns(stmt TSRMLS_CC)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (!dispatch_param_event(stmt, PDO_PARAM_EVT_FETCH_POST TSRMLS_CC)) {
|
||||
return 0;
|
||||
}
|
||||
@@ -751,7 +751,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
|
||||
stmt->fetch.cls.ce = ZEND_STANDARD_CLASS_DEF_PTR;
|
||||
ce = ZEND_STANDARD_CLASS_DEF_PTR;
|
||||
}
|
||||
|
||||
|
||||
if (ce->constructor) {
|
||||
fci->function_table = &ce->function_table;
|
||||
fci->function_name = NULL;
|
||||
@@ -780,7 +780,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
|
||||
{
|
||||
char *is_callable_error = NULL;
|
||||
|
||||
if (zend_fcall_info_init(callable, 0, fci, fcc, NULL, &is_callable_error TSRMLS_CC) == FAILURE) {
|
||||
if (zend_fcall_info_init(callable, 0, fci, fcc, NULL, &is_callable_error TSRMLS_CC) == FAILURE) {
|
||||
if (is_callable_error) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", is_callable_error TSRMLS_CC);
|
||||
efree(is_callable_error);
|
||||
@@ -793,10 +793,10 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
|
||||
/* Possible E_STRICT error message */
|
||||
efree(is_callable_error);
|
||||
}
|
||||
|
||||
|
||||
fci->param_count = num_args; /* probably less */
|
||||
fci->params = safe_emalloc(sizeof(zval**), num_args, 0);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -909,7 +909,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
} else if (flags == PDO_FETCH_GROUP && colno) {
|
||||
fetch_value(stmt, return_value, 0, NULL TSRMLS_CC);
|
||||
} else {
|
||||
fetch_value(stmt, return_value, colno, NULL TSRMLS_CC);
|
||||
fetch_value(stmt, return_value, colno, NULL TSRMLS_CC);
|
||||
}
|
||||
if (!return_all) {
|
||||
return 1;
|
||||
@@ -976,7 +976,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case PDO_FETCH_INTO:
|
||||
if (!stmt->fetch.into) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified." TSRMLS_CC);
|
||||
@@ -1006,13 +1006,13 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
/* shouldn't happen */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (return_all && how != PDO_FETCH_KEY_PAIR) {
|
||||
INIT_PZVAL(&grp_val);
|
||||
if (flags == PDO_FETCH_GROUP && how == PDO_FETCH_COLUMN && stmt->fetch.column > 0) {
|
||||
@@ -1037,7 +1037,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
case PDO_FETCH_ASSOC:
|
||||
add_assoc_zval(return_value, stmt->columns[i].name, val);
|
||||
break;
|
||||
|
||||
|
||||
case PDO_FETCH_KEY_PAIR:
|
||||
{
|
||||
zval *tmp;
|
||||
@@ -1144,12 +1144,12 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case PDO_FETCH_FUNC:
|
||||
stmt->fetch.func.values[idx] = val;
|
||||
stmt->fetch.cls.fci.params[idx] = &stmt->fetch.func.values[idx];
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
zval_ptr_dtor(&val);
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range" TSRMLS_CC);
|
||||
@@ -1157,7 +1157,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (how) {
|
||||
case PDO_FETCH_CLASS:
|
||||
if (ce->constructor && !(flags & (PDO_FETCH_PROPS_LATE | PDO_FETCH_SERIALIZE))) {
|
||||
@@ -1199,7 +1199,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
zval_ptr_dtor(&stmt->fetch.func.values[idx]);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, long mode, int fetch_all TSRML
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode" TSRMLS_CC);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (mode == PDO_FETCH_USE_DEFAULT) {
|
||||
flags = stmt->default_fetch_type & PDO_FETCH_FLAGS;
|
||||
mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS;
|
||||
@@ -1256,7 +1256,7 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, long mode, int fetch_all TSRML
|
||||
return 0;
|
||||
}
|
||||
/* fall through */
|
||||
|
||||
|
||||
default:
|
||||
if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "PDO::FETCH_SERIALIZE can only be used together with PDO::FETCH_CLASS" TSRMLS_CC);
|
||||
@@ -1333,7 +1333,7 @@ static PHP_METHOD(PDOStatement, fetchObject)
|
||||
old_ce = stmt->fetch.cls.ce;
|
||||
old_ctor_args = stmt->fetch.cls.ctor_args;
|
||||
old_arg_count = stmt->fetch.cls.fci.param_count;
|
||||
|
||||
|
||||
do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
|
||||
|
||||
if (ctor_args) {
|
||||
@@ -1405,7 +1405,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||
zend_class_entry *old_ce;
|
||||
zval *old_ctor_args, *ctor_args = NULL;
|
||||
int error = 0, flags, old_arg_count;
|
||||
PHP_STMT_GET_OBJ;
|
||||
PHP_STMT_GET_OBJ;
|
||||
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|lzz", &how, &arg2, &ctor_args)) {
|
||||
RETURN_FALSE;
|
||||
@@ -1474,7 +1474,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case PDO_FETCH_COLUMN:
|
||||
switch(ZEND_NUM_ARGS()) {
|
||||
case 0:
|
||||
@@ -1499,7 +1499,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||
}
|
||||
|
||||
flags = how & PDO_FETCH_FLAGS;
|
||||
|
||||
|
||||
if ((how & ~PDO_FETCH_FLAGS) == PDO_FETCH_USE_DEFAULT) {
|
||||
flags |= stmt->default_fetch_type & PDO_FETCH_FLAGS;
|
||||
how |= stmt->default_fetch_type & ~PDO_FETCH_FLAGS;
|
||||
@@ -1508,7 +1508,7 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||
if (!error) {
|
||||
PDO_STMT_CLEAR_ERR();
|
||||
MAKE_STD_ZVAL(data);
|
||||
if ( (how & PDO_FETCH_GROUP) || how == PDO_FETCH_KEY_PAIR ||
|
||||
if ( (how & PDO_FETCH_GROUP) || how == PDO_FETCH_KEY_PAIR ||
|
||||
(how == PDO_FETCH_USE_DEFAULT && stmt->default_fetch_type == PDO_FETCH_KEY_PAIR)
|
||||
) {
|
||||
array_init(return_value);
|
||||
@@ -1537,13 +1537,13 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||
}
|
||||
FREE_ZVAL(data);
|
||||
}
|
||||
|
||||
|
||||
do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
|
||||
|
||||
stmt->fetch.cls.ce = old_ce;
|
||||
stmt->fetch.cls.ctor_args = old_ctor_args;
|
||||
stmt->fetch.cls.fci.param_count = old_arg_count;
|
||||
|
||||
|
||||
if (error) {
|
||||
PDO_HANDLE_STMT_ERR();
|
||||
if (error != 2) {
|
||||
@@ -1569,14 +1569,14 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
|
||||
"lz|llz!", ¶m.paramno, ¶m.parameter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.driver_params)) {
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|llz!", ¶m.name,
|
||||
¶m.namelen, ¶m.parameter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.namelen, ¶m.parameter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.driver_params)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
param.param_type = (int) param_type;
|
||||
|
||||
|
||||
if (param.paramno > 0) {
|
||||
--param.paramno; /* make it zero-based internally */
|
||||
} else if (!param.name) {
|
||||
@@ -1604,7 +1604,7 @@ static PHP_METHOD(PDOStatement, bindValue)
|
||||
PHP_STMT_GET_OBJ;
|
||||
|
||||
param.paramno = -1;
|
||||
|
||||
|
||||
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
"lz/|l", ¶m.paramno, ¶m.parameter, ¶m_type)) {
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/|l", ¶m.name,
|
||||
@@ -1614,14 +1614,14 @@ static PHP_METHOD(PDOStatement, bindValue)
|
||||
}
|
||||
|
||||
param.param_type = (int) param_type;
|
||||
|
||||
|
||||
if (param.paramno > 0) {
|
||||
--param.paramno; /* make it zero-based internally */
|
||||
} else if (!param.name) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "Columns/Parameters are 1-based" TSRMLS_CC);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
Z_ADDREF_P(param.parameter);
|
||||
if (!really_register_bound_param(¶m, stmt, TRUE TSRMLS_CC)) {
|
||||
if (param.parameter) {
|
||||
@@ -1758,7 +1758,7 @@ static int generic_stmt_attr_get(pdo_stmt_t *stmt, zval *return_value, long attr
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static PHP_METHOD(PDOStatement, getAttribute)
|
||||
{
|
||||
long attr;
|
||||
@@ -1859,7 +1859,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
zval ***args;
|
||||
zend_class_entry **cep;
|
||||
int retval;
|
||||
|
||||
|
||||
do_fetch_opt_finish(stmt, 1 TSRMLS_CC);
|
||||
|
||||
switch (stmt->default_fetch_type) {
|
||||
@@ -1872,7 +1872,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
stmt->default_fetch_type = PDO_FETCH_BOTH;
|
||||
|
||||
if (argc == 0) {
|
||||
@@ -1882,7 +1882,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
args = safe_emalloc(ZEND_NUM_ARGS(), sizeof(zval*), 0);
|
||||
|
||||
retval = zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args);
|
||||
|
||||
|
||||
if (SUCCESS == retval) {
|
||||
if (Z_TYPE_PP(args[skip]) != IS_LONG) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "mode must be an integer" TSRMLS_CC);
|
||||
@@ -1890,11 +1890,11 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
} else {
|
||||
mode = Z_LVAL_PP(args[skip]);
|
||||
flags = mode & PDO_FETCH_FLAGS;
|
||||
|
||||
|
||||
retval = pdo_stmt_verify_mode(stmt, mode, 0 TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (FAILURE == retval) {
|
||||
PDO_STMT_CLEAR_ERR();
|
||||
efree(args);
|
||||
@@ -1978,7 +1978,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
do_fetch_class_prepare(stmt TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case PDO_FETCH_INTO:
|
||||
@@ -1989,13 +1989,13 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
} else {
|
||||
retval = SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if (SUCCESS == retval) {
|
||||
#ifdef ilia_0 /* we'll only need this when we have persistent statements, if ever */
|
||||
if (stmt->dbh->is_persistent) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "PHP might crash if you don't call $stmt->setFetchMode() to reset to defaults on this persistent statement. This will be fixed in a later release");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
MAKE_STD_ZVAL(stmt->fetch.into);
|
||||
|
||||
Z_TYPE_P(stmt->fetch.into) = IS_OBJECT;
|
||||
@@ -2003,9 +2003,9 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
Z_OBJ_HT_P(stmt->fetch.into) = Z_OBJ_HT_PP(args[skip+1]);
|
||||
zend_objects_store_add_ref(stmt->fetch.into TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "22003", "Invalid fetch mode specified" TSRMLS_CC);
|
||||
}
|
||||
@@ -2024,10 +2024,10 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
|
||||
PDO_STMT_CLEAR_ERR();
|
||||
|
||||
efree(args);
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
static PHP_METHOD(PDOStatement, setFetchMode)
|
||||
{
|
||||
PHP_STMT_GET_OBJ;
|
||||
@@ -2048,7 +2048,7 @@ static int pdo_stmt_do_next_rowset(pdo_stmt_t *stmt TSRMLS_DC)
|
||||
if (stmt->columns) {
|
||||
int i;
|
||||
struct pdo_column_data *cols = stmt->columns;
|
||||
|
||||
|
||||
for (i = 0; i < stmt->column_count; i++) {
|
||||
efree(cols[i].name);
|
||||
}
|
||||
@@ -2078,7 +2078,7 @@ static PHP_METHOD(PDOStatement, nextRowset)
|
||||
}
|
||||
|
||||
PDO_STMT_CLEAR_ERR();
|
||||
|
||||
|
||||
if (!pdo_stmt_do_next_rowset(stmt TSRMLS_CC)) {
|
||||
PDO_HANDLE_STMT_ERR();
|
||||
RETURN_FALSE;
|
||||
@@ -2106,7 +2106,7 @@ static PHP_METHOD(PDOStatement, closeCursor)
|
||||
if (!pdo_stmt_do_next_rowset(stmt TSRMLS_CC)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
} while (1);
|
||||
stmt->executed = 0;
|
||||
RETURN_TRUE;
|
||||
@@ -2135,14 +2135,14 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
|
||||
if (out == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
php_stream_printf(out TSRMLS_CC, "SQL: [%d] %.*s\n",
|
||||
stmt->query_stringlen,
|
||||
stmt->query_stringlen, stmt->query_string);
|
||||
|
||||
php_stream_printf(out TSRMLS_CC, "Params: %d\n",
|
||||
stmt->bound_params ? zend_hash_num_elements(stmt->bound_params) : 0);
|
||||
|
||||
|
||||
if (stmt->bound_params) {
|
||||
zend_hash_internal_pointer_reset_ex(stmt->bound_params, &pos);
|
||||
while (SUCCESS == zend_hash_get_current_data_ex(stmt->bound_params,
|
||||
@@ -2163,7 +2163,7 @@ static PHP_METHOD(PDOStatement, debugDumpParams)
|
||||
param->paramno, param->namelen, param->namelen, param->name ? param->name : "",
|
||||
param->is_param,
|
||||
param->param_type);
|
||||
|
||||
|
||||
zend_hash_move_forward_ex(stmt->bound_params, &pos);
|
||||
}
|
||||
}
|
||||
@@ -2240,18 +2240,25 @@ static void dbstmt_prop_delete(zval *object, zval *member, const zend_literal *k
|
||||
}
|
||||
}
|
||||
|
||||
static union _zend_function *dbstmt_method_get(zval **object_pp, char *method_name, int method_len, const zend_literal *key TSRMLS_DC)
|
||||
static union _zend_function *dbstmt_method_get(
|
||||
#if PHP_API_VERSION >= 20041225
|
||||
zval **object_pp,
|
||||
#else
|
||||
zval *object,
|
||||
#endif
|
||||
char *method_name, int method_len, const zend_literal *key TSRMLS_DC)
|
||||
{
|
||||
zend_function *fbc = NULL;
|
||||
char *lc_method_name;
|
||||
#if PHP_API_VERSION >= 20041225
|
||||
zval *object = *object_pp;
|
||||
#endif
|
||||
|
||||
lc_method_name = emalloc(method_len + 1);
|
||||
zend_str_tolower_copy(lc_method_name, method_name, method_len);
|
||||
|
||||
if (zend_hash_find(&Z_OBJCE_P(object)->function_table, lc_method_name,
|
||||
if (zend_hash_find(&Z_OBJCE_P(object)->function_table, lc_method_name,
|
||||
method_len+1, (void**)&fbc) == FAILURE) {
|
||||
|
||||
pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(object TSRMLS_CC);
|
||||
/* instance not created by PDO object */
|
||||
if (!stmt->dbh) {
|
||||
@@ -2260,7 +2267,7 @@ static union _zend_function *dbstmt_method_get(zval **object_pp, char *method_na
|
||||
/* not a pre-defined method, nor a user-defined method; check
|
||||
* the driver specific methods */
|
||||
if (!stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) {
|
||||
if (!pdo_hash_methods(stmt->dbh,
|
||||
if (!pdo_hash_methods(stmt->dbh,
|
||||
PDO_DBH_DRIVER_METHOD_KIND_STMT TSRMLS_CC)
|
||||
|| !stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) {
|
||||
goto out;
|
||||
@@ -2269,15 +2276,13 @@ static union _zend_function *dbstmt_method_get(zval **object_pp, char *method_na
|
||||
|
||||
if (zend_hash_find(stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT],
|
||||
lc_method_name, method_len+1, (void**)&fbc) == FAILURE) {
|
||||
fbc = NULL;
|
||||
goto out;
|
||||
}
|
||||
/* got it */
|
||||
}
|
||||
|
||||
|
||||
out:
|
||||
if (!fbc) {
|
||||
fbc = std_object_handlers.get_method(object_pp, method_name, method_len, key TSRMLS_CC);
|
||||
}
|
||||
efree(lc_method_name);
|
||||
return fbc;
|
||||
}
|
||||
@@ -2300,15 +2305,15 @@ static zend_object_value dbstmt_clone_obj(zval *zobject TSRMLS_DC)
|
||||
stmt->refcount = 1;
|
||||
|
||||
old_stmt = (pdo_stmt_t *)zend_object_store_get_object(zobject TSRMLS_CC);
|
||||
|
||||
|
||||
retval.handle = zend_objects_store_put(stmt, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbstmt_free_storage, (zend_objects_store_clone_t)dbstmt_clone_obj TSRMLS_CC);
|
||||
retval.handlers = Z_OBJ_HT_P(zobject);
|
||||
|
||||
zend_objects_clone_members((zend_object *)stmt, retval, (zend_object *)old_stmt, handle TSRMLS_CC);
|
||||
|
||||
|
||||
zend_objects_store_add_ref(&old_stmt->database_object_handle TSRMLS_CC);
|
||||
stmt->database_object_handle = old_stmt->database_object_handle;
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2323,7 +2328,7 @@ void pdo_stmt_init(TSRMLS_D)
|
||||
pdo_dbstmt_ce = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
pdo_dbstmt_ce->get_iterator = pdo_stmt_iter_get;
|
||||
pdo_dbstmt_ce->create_object = pdo_dbstmt_new;
|
||||
zend_class_implements(pdo_dbstmt_ce TSRMLS_CC, 1, zend_ce_traversable);
|
||||
zend_class_implements(pdo_dbstmt_ce TSRMLS_CC, 1, zend_ce_traversable);
|
||||
zend_declare_property_null(pdo_dbstmt_ce, "queryString", sizeof("queryString")-1, ZEND_ACC_PUBLIC TSRMLS_CC);
|
||||
|
||||
memcpy(&pdo_dbstmt_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
|
||||
@@ -2383,7 +2388,7 @@ static void free_statement(pdo_stmt_t *stmt TSRMLS_DC)
|
||||
FREE_ZVAL(stmt->fetch.into);
|
||||
stmt->fetch.into = NULL;
|
||||
}
|
||||
|
||||
|
||||
do_fetch_opt_finish(stmt, 1 TSRMLS_CC);
|
||||
|
||||
zend_objects_store_del_ref(&stmt->database_object_handle TSRMLS_CC);
|
||||
@@ -2445,7 +2450,7 @@ static void pdo_stmt_iter_dtor(zend_object_iterator *iter TSRMLS_DC)
|
||||
if (--I->stmt->refcount == 0) {
|
||||
free_statement(I->stmt TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
if (I->fetch_ahead) {
|
||||
zval_ptr_dtor(&I->fetch_ahead);
|
||||
}
|
||||
@@ -2589,7 +2594,7 @@ static zval *row_prop_read(zval *object, zval *member, int type, const zend_lite
|
||||
|
||||
Z_SET_REFCOUNT_P(return_value, 0);
|
||||
Z_UNSET_ISREF_P(return_value);
|
||||
|
||||
|
||||
return return_value;
|
||||
}
|
||||
|
||||
@@ -2655,7 +2660,7 @@ static HashTable *row_get_properties(zval *object TSRMLS_DC)
|
||||
if (stmt == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
if (!stmt->std.properties) {
|
||||
rebuild_object_properties(&stmt->std);
|
||||
}
|
||||
@@ -2671,7 +2676,11 @@ static HashTable *row_get_properties(zval *object TSRMLS_DC)
|
||||
}
|
||||
|
||||
static union _zend_function *row_method_get(
|
||||
#if PHP_API_VERSION >= 20041225
|
||||
zval **object_pp,
|
||||
#else
|
||||
zval *object,
|
||||
#endif
|
||||
char *method_name, int method_len, const zend_literal *key TSRMLS_DC)
|
||||
{
|
||||
zend_function *fbc;
|
||||
@@ -2684,7 +2693,7 @@ static union _zend_function *row_method_get(
|
||||
efree(lc_method_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
efree(lc_method_name);
|
||||
return fbc;
|
||||
}
|
||||
@@ -2758,7 +2767,7 @@ void pdo_row_free_storage(pdo_stmt_t *stmt TSRMLS_DC)
|
||||
{
|
||||
if (stmt) {
|
||||
ZVAL_NULL(&stmt->lazy_object_ref);
|
||||
|
||||
|
||||
if (--stmt->refcount == 0) {
|
||||
free_statement(stmt TSRMLS_CC);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
PDO Common: Bug #47769 (Strange extends PDO)
|
||||
Bug #47769 (Strange extends PDO)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("pdo_sqlite"))
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
PDO Common: Bug #61292 (Segfault while calling a method on an overloaded PDO object)
|
||||
Bug #61292 (Segfault while calling a method on an overloaded PDO object)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo')) die('skip');
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
PDO Common: Bug #65946 (pdo_sql_parser.c permanently converts values bound to strings)
|
||||
Bug #65946 (pdo_sql_parser.c permanently converts values bound to strings)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo')) die('skip');
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
PDO Common: Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
|
||||
Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
|
||||
--SKIPIF--
|
||||
<?php # vim:ft=php
|
||||
if (!extension_loaded('pdo')) die('skip PDO not available');
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
--TEST--
|
||||
PDO Common: Bug #52098 Own PDOStatement implementation ignore __call()
|
||||
--SKIPIF--
|
||||
<?php # vim:ft=php
|
||||
if (!extension_loaded('pdo')) die('skip');
|
||||
$dir = getenv('REDIR_TEST_DIR');
|
||||
if (false == $dir) die('skip no driver');
|
||||
require_once $dir . 'pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
|
||||
require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
|
||||
$db = PDOTest::factory();
|
||||
|
||||
@$db->exec("DROP TABLE test");
|
||||
$db->exec("CREATE TABLE test (x int)");
|
||||
$db->exec("INSERT INTO test VALUES (1)");
|
||||
|
||||
class MyStatement extends PDOStatement
|
||||
{
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
echo "Calling object method '$name'" . implode(', ', $arguments). "\n";
|
||||
}
|
||||
}
|
||||
/*
|
||||
Test prepared statement with PDOStatement class.
|
||||
*/
|
||||
$derived = $db->prepare('SELECT * FROM test', array(PDO::ATTR_STATEMENT_CLASS=>array('MyStatement')));
|
||||
$derived->execute();
|
||||
$derived->foo();
|
||||
$derived->fetchAll();
|
||||
$derived = null;
|
||||
|
||||
/*
|
||||
Test regular statement with PDOStatement class.
|
||||
*/
|
||||
$db->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('MyStatement'));
|
||||
$r = $db->query('SELECT * FROM test');
|
||||
echo $r->bar();
|
||||
$r->fetchAll();
|
||||
$r = null;
|
||||
|
||||
/*
|
||||
Test object instance of PDOStatement class.
|
||||
*/
|
||||
$obj = new MyStatement;
|
||||
echo $obj->lucky();
|
||||
|
||||
$db->exec("DROP TABLE test");
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Calling object method 'foo'
|
||||
Calling object method 'bar'
|
||||
Calling object method 'lucky'
|
||||
===DONE===
|
||||
@@ -1,104 +0,0 @@
|
||||
--TEST--
|
||||
PDO Common: Bug #71447 (Quotes inside comments not properly handled)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo')) die('skip');
|
||||
$dir = getenv('REDIR_TEST_DIR');
|
||||
if (false == $dir) die('skip no driver');
|
||||
require_once $dir . 'pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
|
||||
require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
|
||||
|
||||
$db = PDOTest::factory();
|
||||
$db->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING);
|
||||
$db->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_NUM);
|
||||
$db->setAttribute (\PDO::ATTR_EMULATE_PREPARES, false);
|
||||
$db->exec('CREATE TABLE test(id int)');
|
||||
$db->exec('INSERT INTO test VALUES(1)');
|
||||
|
||||
// Comment without quotes or placeholders
|
||||
$stmt = $db->prepare("
|
||||
SELECT -- Thats all folks!
|
||||
'\"abc\":8000'
|
||||
FROM test
|
||||
");
|
||||
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
// Comment and placeholder within a string
|
||||
$stmt = $db->prepare("
|
||||
SELECT
|
||||
'\"abc\":8001 -- Wat?'
|
||||
FROM test
|
||||
");
|
||||
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
// Comment with single quote
|
||||
$stmt = $db->prepare("
|
||||
SELECT -- That's all folks!
|
||||
'\"abc\":8002'
|
||||
FROM test
|
||||
");
|
||||
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
// C-Style comment with single quote
|
||||
$stmt = $db->prepare("
|
||||
SELECT /* That's all folks! */
|
||||
'\"abc\":8003'
|
||||
FROM test
|
||||
");
|
||||
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
// Comment with double quote
|
||||
$stmt = $db->prepare("
|
||||
SELECT -- Is it only \"single quotes?
|
||||
'\"abc\":8004'
|
||||
FROM test
|
||||
");
|
||||
|
||||
$stmt->execute();
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
// Comment with ? placeholder
|
||||
$stmt = $db->prepare("
|
||||
SELECT -- What about question marks here?
|
||||
*
|
||||
FROM test
|
||||
WHERE id = ?
|
||||
");
|
||||
|
||||
$stmt->execute([1]);
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
// Comment with named placeholder
|
||||
$stmt = $db->prepare("
|
||||
SELECT -- What about placeholders :bar
|
||||
*
|
||||
FROM test
|
||||
WHERE id = :id
|
||||
");
|
||||
|
||||
$stmt->execute(['id' => 1]);
|
||||
var_dump($stmt->fetchColumn());
|
||||
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(10) ""abc":8000"
|
||||
string(18) ""abc":8001 -- Wat?"
|
||||
string(10) ""abc":8002"
|
||||
string(10) ""abc":8003"
|
||||
string(10) ""abc":8004"
|
||||
string(1) "1"
|
||||
string(1) "1"
|
||||
@@ -55,5 +55,5 @@ CAUGHT: Cannot create any files in magic ".phar" directory
|
||||
CAUGHT: Cannot create any files in magic ".phar" directory
|
||||
CAUGHT: Cannot create any files in magic ".phar" directory
|
||||
|
||||
Warning: Phar::addFromString() expects parameter 1 to be a valid path, string given in %s%ebug64931.php on line %d
|
||||
===DONE===
|
||||
Warning: Phar::addFromString() expects parameter 1 to be a valid path, string given in %s/bug64931.php on line %d
|
||||
===DONE===
|
||||
@@ -275,6 +275,11 @@ static zend_object_value spl_object_storage_new_ex(zend_class_entry *class_type,
|
||||
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_SplOjectStorage_free_storage, NULL TSRMLS_CC);
|
||||
retval.handlers = &spl_handler_SplObjectStorage;
|
||||
|
||||
if (orig) {
|
||||
spl_SplObjectStorage *other = (spl_SplObjectStorage*)zend_object_store_get_object(orig TSRMLS_CC);
|
||||
spl_object_storage_addall(intern, orig, other TSRMLS_CC);
|
||||
}
|
||||
|
||||
while (parent) {
|
||||
if (parent == spl_ce_SplObjectStorage) {
|
||||
if (class_type != spl_ce_SplObjectStorage) {
|
||||
@@ -289,11 +294,6 @@ static zend_object_value spl_object_storage_new_ex(zend_class_entry *class_type,
|
||||
parent = parent->parent;
|
||||
}
|
||||
|
||||
if (orig) {
|
||||
spl_SplObjectStorage *other = (spl_SplObjectStorage*)zend_object_store_get_object(orig TSRMLS_CC);
|
||||
spl_object_storage_addall(intern, orig, other TSRMLS_CC);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -44,5 +44,5 @@ object(SplObjectStorage)#2 (1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Error at offset 78 of 78 bytes
|
||||
Error at offset 79 of 78 bytes
|
||||
DONE
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #67582: Cloned SplObjectStorage with overwritten getHash fails offsetExists()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class MyObjectStorage extends SplObjectStorage {
|
||||
// Overwrite getHash() with just some (working) test-method
|
||||
public function getHash($object) { return get_class($object); }
|
||||
}
|
||||
|
||||
class TestObject {}
|
||||
|
||||
$list = new MyObjectStorage();
|
||||
$list->attach(new TestObject());
|
||||
|
||||
foreach($list as $x) var_dump($list->offsetExists($x));
|
||||
|
||||
$list2 = clone $list;
|
||||
foreach($list2 as $x) var_dump($list2->offsetExists($x));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
+7
-12
@@ -236,23 +236,18 @@ PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt,
|
||||
# elif defined(CRYPT_R_CRYPTD)
|
||||
CRYPTD buffer;
|
||||
# else
|
||||
# error Data struct used by crypt_r() is unknown. Please report.
|
||||
# error Data struct used by crypt_r() is unknown. Please report.
|
||||
# endif
|
||||
crypt_res = crypt_r(password, salt, &buffer);
|
||||
if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
|
||||
return FAILURE;
|
||||
} else {
|
||||
*result = estrdup(crypt_res);
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
# elif defined(HAVE_CRYPT)
|
||||
crypt_res = crypt(password, salt);
|
||||
# else
|
||||
# error No crypt() implementation
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
|
||||
return FAILURE;
|
||||
} else {
|
||||
*result = estrdup(crypt_res);
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Bug #71840 (Unserialize accepts wrongly data)
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(unserialize('a:1:{s:0:""0a:0:{}}'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: unserialize(): Error at offset 11 of 19 bytes in %sbug71840.php on line %d
|
||||
bool(false)
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by re2c 0.13.5 */
|
||||
/* Generated by re2c 0.13.7.5 */
|
||||
#line 1 "ext/standard/var_unserializer.re"
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -542,7 +542,7 @@ yy2:
|
||||
yych = *(YYMARKER = ++YYCURSOR);
|
||||
if (yych == ':') goto yy95;
|
||||
yy3:
|
||||
#line 851 "ext/standard/var_unserializer.re"
|
||||
#line 840 "ext/standard/var_unserializer.re"
|
||||
{ return 0; }
|
||||
#line 548 "ext/standard/var_unserializer.c"
|
||||
yy4:
|
||||
@@ -587,7 +587,7 @@ yy13:
|
||||
goto yy3;
|
||||
yy14:
|
||||
++YYCURSOR;
|
||||
#line 845 "ext/standard/var_unserializer.re"
|
||||
#line 834 "ext/standard/var_unserializer.re"
|
||||
{
|
||||
/* this is the case where we have less data than planned */
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data");
|
||||
@@ -619,11 +619,12 @@ yy20:
|
||||
if (yybm[0+yych] & 128) {
|
||||
goto yy20;
|
||||
}
|
||||
if (yych != ':') goto yy18;
|
||||
if (yych <= '/') goto yy18;
|
||||
if (yych >= ';') goto yy18;
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '"') goto yy18;
|
||||
++YYCURSOR;
|
||||
#line 698 "ext/standard/var_unserializer.re"
|
||||
#line 687 "ext/standard/var_unserializer.re"
|
||||
{
|
||||
size_t len, len2, len3, maxlen;
|
||||
long elements;
|
||||
@@ -770,7 +771,7 @@ yy20:
|
||||
|
||||
return object_common2(UNSERIALIZE_PASSTHRU, elements);
|
||||
}
|
||||
#line 774 "ext/standard/var_unserializer.c"
|
||||
#line 775 "ext/standard/var_unserializer.c"
|
||||
yy25:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
@@ -795,7 +796,7 @@ yy27:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '"') goto yy18;
|
||||
++YYCURSOR;
|
||||
#line 689 "ext/standard/var_unserializer.re"
|
||||
#line 678 "ext/standard/var_unserializer.re"
|
||||
{
|
||||
if (!var_hash) return 0;
|
||||
|
||||
@@ -804,7 +805,7 @@ yy27:
|
||||
return object_common2(UNSERIALIZE_PASSTHRU,
|
||||
object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR));
|
||||
}
|
||||
#line 808 "ext/standard/var_unserializer.c"
|
||||
#line 809 "ext/standard/var_unserializer.c"
|
||||
yy32:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == '+') goto yy33;
|
||||
@@ -825,7 +826,7 @@ yy34:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '{') goto yy18;
|
||||
++YYCURSOR;
|
||||
#line 668 "ext/standard/var_unserializer.re"
|
||||
#line 657 "ext/standard/var_unserializer.re"
|
||||
{
|
||||
long elements = parse_iv(start + 2);
|
||||
/* use iv() not uiv() in order to check data range */
|
||||
@@ -846,7 +847,7 @@ yy34:
|
||||
|
||||
return finish_nested_data(UNSERIALIZE_PASSTHRU);
|
||||
}
|
||||
#line 850 "ext/standard/var_unserializer.c"
|
||||
#line 851 "ext/standard/var_unserializer.c"
|
||||
yy39:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == '+') goto yy40;
|
||||
@@ -867,7 +868,7 @@ yy41:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych != '"') goto yy18;
|
||||
++YYCURSOR;
|
||||
#line 633 "ext/standard/var_unserializer.re"
|
||||
#line 628 "ext/standard/var_unserializer.re"
|
||||
{
|
||||
size_t len, maxlen;
|
||||
char *str;
|
||||
@@ -889,12 +890,6 @@ yy41:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*(YYCURSOR + 1) != ';') {
|
||||
efree(str);
|
||||
*p = YYCURSOR + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
YYCURSOR += 2;
|
||||
*p = YYCURSOR;
|
||||
|
||||
@@ -902,7 +897,7 @@ yy41:
|
||||
ZVAL_STRINGL(*rval, str, len, 0);
|
||||
return 1;
|
||||
}
|
||||
#line 906 "ext/standard/var_unserializer.c"
|
||||
#line 901 "ext/standard/var_unserializer.c"
|
||||
yy46:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == '+') goto yy47;
|
||||
@@ -944,11 +939,6 @@ yy48:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*(YYCURSOR + 1) != ';') {
|
||||
*p = YYCURSOR + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
YYCURSOR += 2;
|
||||
*p = YYCURSOR;
|
||||
|
||||
@@ -956,7 +946,7 @@ yy48:
|
||||
ZVAL_STRINGL(*rval, str, len, 1);
|
||||
return 1;
|
||||
}
|
||||
#line 960 "ext/standard/var_unserializer.c"
|
||||
#line 950 "ext/standard/var_unserializer.c"
|
||||
yy53:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') {
|
||||
@@ -1054,7 +1044,7 @@ use_double:
|
||||
ZVAL_DOUBLE(*rval, zend_strtod((const char *)start + 2, NULL));
|
||||
return 1;
|
||||
}
|
||||
#line 1058 "ext/standard/var_unserializer.c"
|
||||
#line 1048 "ext/standard/var_unserializer.c"
|
||||
yy65:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
@@ -1128,7 +1118,7 @@ yy73:
|
||||
|
||||
return 1;
|
||||
}
|
||||
#line 1132 "ext/standard/var_unserializer.c"
|
||||
#line 1122 "ext/standard/var_unserializer.c"
|
||||
yy76:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych == 'N') goto yy73;
|
||||
@@ -1182,7 +1172,7 @@ yy79:
|
||||
ZVAL_LONG(*rval, parse_iv(start + 2));
|
||||
return 1;
|
||||
}
|
||||
#line 1186 "ext/standard/var_unserializer.c"
|
||||
#line 1176 "ext/standard/var_unserializer.c"
|
||||
yy83:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= '/') goto yy18;
|
||||
@@ -1197,7 +1187,7 @@ yy83:
|
||||
ZVAL_BOOL(*rval, parse_iv(start + 2));
|
||||
return 1;
|
||||
}
|
||||
#line 1201 "ext/standard/var_unserializer.c"
|
||||
#line 1191 "ext/standard/var_unserializer.c"
|
||||
yy87:
|
||||
++YYCURSOR;
|
||||
#line 534 "ext/standard/var_unserializer.re"
|
||||
@@ -1207,7 +1197,7 @@ yy87:
|
||||
ZVAL_NULL(*rval);
|
||||
return 1;
|
||||
}
|
||||
#line 1211 "ext/standard/var_unserializer.c"
|
||||
#line 1201 "ext/standard/var_unserializer.c"
|
||||
yy89:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
@@ -1253,7 +1243,7 @@ yy91:
|
||||
|
||||
return 1;
|
||||
}
|
||||
#line 1257 "ext/standard/var_unserializer.c"
|
||||
#line 1247 "ext/standard/var_unserializer.c"
|
||||
yy95:
|
||||
yych = *++YYCURSOR;
|
||||
if (yych <= ',') {
|
||||
@@ -1297,9 +1287,9 @@ yy97:
|
||||
|
||||
return 1;
|
||||
}
|
||||
#line 1301 "ext/standard/var_unserializer.c"
|
||||
#line 1291 "ext/standard/var_unserializer.c"
|
||||
}
|
||||
#line 853 "ext/standard/var_unserializer.re"
|
||||
#line 842 "ext/standard/var_unserializer.re"
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -617,11 +617,6 @@ use_double:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*(YYCURSOR + 1) != ';') {
|
||||
*p = YYCURSOR + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
YYCURSOR += 2;
|
||||
*p = YYCURSOR;
|
||||
|
||||
@@ -651,12 +646,6 @@ use_double:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*(YYCURSOR + 1) != ';') {
|
||||
efree(str);
|
||||
*p = YYCURSOR + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
YYCURSOR += 2;
|
||||
*p = YYCURSOR;
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #72099: xml_parse_into_struct segmentation fault
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once("skipif.inc");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$var1=xml_parser_create_ns();
|
||||
$var2=str_repeat("a", 10);
|
||||
$var3=[];
|
||||
$var4=[];
|
||||
xml_parse_into_struct($var1, $var2, $var3, $var4);
|
||||
var_dump($var3);
|
||||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
+53
-53
@@ -283,7 +283,7 @@ xml_encoding xml_encodings[] = {
|
||||
static XML_Memory_Handling_Suite php_xml_mem_hdlrs;
|
||||
|
||||
/* True globals, no need for thread safety */
|
||||
static int le_xml_parser;
|
||||
static int le_xml_parser;
|
||||
|
||||
/* }}} */
|
||||
|
||||
@@ -343,7 +343,7 @@ PHP_MINIT_FUNCTION(xml)
|
||||
REGISTER_LONG_CONSTANT("XML_OPTION_SKIP_WHITE", PHP_XML_OPTION_SKIP_WHITE, CONST_CS|CONST_PERSISTENT);
|
||||
|
||||
/* this object should not be pre-initialised at compile time,
|
||||
as the order of members may vary */
|
||||
as the order of members may vary */
|
||||
|
||||
php_xml_mem_hdlrs.malloc_fcn = php_xml_malloc_wrapper;
|
||||
php_xml_mem_hdlrs.realloc_fcn = php_xml_realloc_wrapper;
|
||||
@@ -404,7 +404,7 @@ static zval *_xml_xmlchar_zval(const XML_Char *s, int len, const XML_Char *encod
|
||||
{
|
||||
zval *ret;
|
||||
MAKE_STD_ZVAL(ret);
|
||||
|
||||
|
||||
if (s == NULL) {
|
||||
ZVAL_FALSE(ret);
|
||||
return ret;
|
||||
@@ -422,7 +422,7 @@ static zval *_xml_xmlchar_zval(const XML_Char *s, int len, const XML_Char *encod
|
||||
static void xml_parser_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
xml_parser *parser = (xml_parser *)rsrc->ptr;
|
||||
|
||||
|
||||
if (parser->parser) {
|
||||
XML_ParserFree(parser->parser);
|
||||
}
|
||||
@@ -503,7 +503,7 @@ static void xml_set_handler(zval **handler, zval **data)
|
||||
/* {{{ xml_call_handler() */
|
||||
static zval *xml_call_handler(xml_parser *parser, zval *handler, zend_function *function_ptr, int argc, zval **argv)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (parser && handler && !EG(exception)) {
|
||||
@@ -516,7 +516,7 @@ static zval *xml_call_handler(xml_parser *parser, zval *handler, zend_function *
|
||||
for (i = 0; i < argc; i++) {
|
||||
args[i] = &argv[i];
|
||||
}
|
||||
|
||||
|
||||
fci.size = sizeof(fci);
|
||||
fci.function_table = EG(function_table);
|
||||
fci.function_name = handler;
|
||||
@@ -540,7 +540,7 @@ static zval *xml_call_handler(xml_parser *parser, zval *handler, zend_function *
|
||||
Z_TYPE_PP(obj) == IS_OBJECT &&
|
||||
Z_TYPE_PP(method) == IS_STRING) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s::%s()", Z_OBJCE_PP(obj)->name, Z_STRVAL_PP(method));
|
||||
} else
|
||||
} else
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler");
|
||||
}
|
||||
|
||||
@@ -739,14 +739,14 @@ static void _xml_add_to_info(xml_parser *parser,char *name)
|
||||
|
||||
if (zend_hash_find(Z_ARRVAL_P(parser->info),name,strlen(name) + 1,(void **) &element) == FAILURE) {
|
||||
MAKE_STD_ZVAL(values);
|
||||
|
||||
|
||||
array_init(values);
|
||||
|
||||
|
||||
zend_hash_update(Z_ARRVAL_P(parser->info), name, strlen(name)+1, (void *) &values, sizeof(zval*), (void **) &element);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
add_next_index_long(*element,parser->curtag);
|
||||
|
||||
|
||||
parser->curtag++;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -798,11 +798,11 @@ void _xml_startElementHandler(void *userData, const XML_Char *name, const XML_Ch
|
||||
|
||||
efree(att);
|
||||
}
|
||||
|
||||
|
||||
if ((retval = xml_call_handler(parser, parser->startElementHandler, parser->startElementPtr, 3, args))) {
|
||||
zval_ptr_dtor(&retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parser->data) {
|
||||
if (parser->level <= XML_MAXLEVEL) {
|
||||
@@ -874,7 +874,7 @@ void _xml_endElementHandler(void *userData, const XML_Char *name)
|
||||
if ((retval = xml_call_handler(parser, parser->endElementHandler, parser->endElementPtr, 2, args))) {
|
||||
zval_ptr_dtor(&retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parser->data) {
|
||||
zval *tag;
|
||||
@@ -885,13 +885,13 @@ void _xml_endElementHandler(void *userData, const XML_Char *name)
|
||||
MAKE_STD_ZVAL(tag);
|
||||
|
||||
array_init(tag);
|
||||
|
||||
|
||||
_xml_add_to_info(parser,((char *) tag_name) + parser->toffset);
|
||||
|
||||
add_assoc_string(tag,"tag",((char *) tag_name) + parser->toffset,1); /* cast to avoid gcc-warning */
|
||||
add_assoc_string(tag,"type","close",1);
|
||||
add_assoc_long(tag,"level",parser->level);
|
||||
|
||||
|
||||
zend_hash_next_index_insert(Z_ARRVAL_P(parser->data),&tag,sizeof(zval*),NULL);
|
||||
}
|
||||
|
||||
@@ -923,7 +923,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
|
||||
if ((retval = xml_call_handler(parser, parser->characterDataHandler, parser->characterDataPtr, 2, args))) {
|
||||
zval_ptr_dtor(&retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parser->data) {
|
||||
int i;
|
||||
@@ -931,7 +931,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
|
||||
|
||||
char *decoded_value;
|
||||
int decoded_len;
|
||||
|
||||
|
||||
decoded_value = xml_utf8_decode(s,len,&decoded_len,parser->target_encoding);
|
||||
for (i = 0; i < decoded_len; i++) {
|
||||
switch (decoded_value[i]) {
|
||||
@@ -950,7 +950,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
|
||||
if (doprint || (! parser->skipwhite)) {
|
||||
if (parser->lastwasopen) {
|
||||
zval **myval;
|
||||
|
||||
|
||||
/* check if the current tag already has a value - if yes append to that! */
|
||||
if (zend_hash_find(Z_ARRVAL_PP(parser->ctag),"value",sizeof("value"),(void **) &myval) == SUCCESS) {
|
||||
int newlen = Z_STRLEN_PP(myval) + decoded_len;
|
||||
@@ -961,7 +961,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
|
||||
} else {
|
||||
add_assoc_string(*(parser->ctag),"value",decoded_value,0);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
zval *tag;
|
||||
zval **curtag, **mytype, **myval;
|
||||
@@ -984,7 +984,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
|
||||
}
|
||||
}
|
||||
|
||||
if (parser->level <= XML_MAXLEVEL && parser->level > 0) {
|
||||
if (parser->level <= XML_MAXLEVEL) {
|
||||
MAKE_STD_ZVAL(tag);
|
||||
|
||||
array_init(tag);
|
||||
@@ -1046,8 +1046,8 @@ void _xml_defaultHandler(void *userData, const XML_Char *s, int len)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ _xml_unparsedEntityDeclHandler() */
|
||||
void _xml_unparsedEntityDeclHandler(void *userData,
|
||||
const XML_Char *entityName,
|
||||
void _xml_unparsedEntityDeclHandler(void *userData,
|
||||
const XML_Char *entityName,
|
||||
const XML_Char *base,
|
||||
const XML_Char *systemId,
|
||||
const XML_Char *publicId,
|
||||
@@ -1172,9 +1172,9 @@ static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int ns_supp
|
||||
|
||||
char *ns_param = NULL;
|
||||
int ns_param_len = 0;
|
||||
|
||||
|
||||
XML_Char *encoding;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, (ns_support ? "|ss": "|s"), &encoding_param, &encoding_param_len, &ns_param, &ns_param_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -1220,15 +1220,15 @@ static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int ns_supp
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto resource xml_parser_create([string encoding])
|
||||
/* {{{ proto resource xml_parser_create([string encoding])
|
||||
Create an XML parser */
|
||||
PHP_FUNCTION(xml_parser_create)
|
||||
{
|
||||
php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
|
||||
php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto resource xml_parser_create_ns([string encoding [, string sep]])
|
||||
/* {{{ proto resource xml_parser_create_ns([string encoding [, string sep]])
|
||||
Create an XML parser */
|
||||
PHP_FUNCTION(xml_parser_create_ns)
|
||||
{
|
||||
@@ -1236,7 +1236,7 @@ PHP_FUNCTION(xml_parser_create_ns)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_object(resource parser, object &obj)
|
||||
/* {{{ proto int xml_set_object(resource parser, object &obj)
|
||||
Set up object which should be used for callbacks */
|
||||
PHP_FUNCTION(xml_set_object)
|
||||
{
|
||||
@@ -1256,7 +1256,7 @@ PHP_FUNCTION(xml_set_object)
|
||||
|
||||
/* please leave this commented - or ask thies@thieso.net before doing it (again) */
|
||||
/* #ifdef ZEND_ENGINE_2
|
||||
zval_add_ref(&parser->object);
|
||||
zval_add_ref(&parser->object);
|
||||
#endif */
|
||||
|
||||
ALLOC_ZVAL(parser->object);
|
||||
@@ -1266,7 +1266,7 @@ PHP_FUNCTION(xml_set_object)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_element_handler(resource parser, string shdl, string ehdl)
|
||||
/* {{{ proto int xml_set_element_handler(resource parser, string shdl, string ehdl)
|
||||
Set up start and end element handlers */
|
||||
PHP_FUNCTION(xml_set_element_handler)
|
||||
{
|
||||
@@ -1286,7 +1286,7 @@ PHP_FUNCTION(xml_set_element_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_character_data_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_character_data_handler(resource parser, string hdl)
|
||||
Set up character data handler */
|
||||
PHP_FUNCTION(xml_set_character_data_handler)
|
||||
{
|
||||
@@ -1305,7 +1305,7 @@ PHP_FUNCTION(xml_set_character_data_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_processing_instruction_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_processing_instruction_handler(resource parser, string hdl)
|
||||
Set up processing instruction (PI) handler */
|
||||
PHP_FUNCTION(xml_set_processing_instruction_handler)
|
||||
{
|
||||
@@ -1324,7 +1324,7 @@ PHP_FUNCTION(xml_set_processing_instruction_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_default_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_default_handler(resource parser, string hdl)
|
||||
Set up default handler */
|
||||
PHP_FUNCTION(xml_set_default_handler)
|
||||
{
|
||||
@@ -1342,7 +1342,7 @@ PHP_FUNCTION(xml_set_default_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)
|
||||
Set up unparsed entity declaration handler */
|
||||
PHP_FUNCTION(xml_set_unparsed_entity_decl_handler)
|
||||
{
|
||||
@@ -1361,7 +1361,7 @@ PHP_FUNCTION(xml_set_unparsed_entity_decl_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_notation_decl_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_notation_decl_handler(resource parser, string hdl)
|
||||
Set up notation declaration handler */
|
||||
PHP_FUNCTION(xml_set_notation_decl_handler)
|
||||
{
|
||||
@@ -1379,7 +1379,7 @@ PHP_FUNCTION(xml_set_notation_decl_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_external_entity_ref_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_external_entity_ref_handler(resource parser, string hdl)
|
||||
Set up external entity reference handler */
|
||||
PHP_FUNCTION(xml_set_external_entity_ref_handler)
|
||||
{
|
||||
@@ -1397,7 +1397,7 @@ PHP_FUNCTION(xml_set_external_entity_ref_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_start_namespace_decl_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_start_namespace_decl_handler(resource parser, string hdl)
|
||||
Set up character data handler */
|
||||
PHP_FUNCTION(xml_set_start_namespace_decl_handler)
|
||||
{
|
||||
@@ -1416,7 +1416,7 @@ PHP_FUNCTION(xml_set_start_namespace_decl_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_set_end_namespace_decl_handler(resource parser, string hdl)
|
||||
/* {{{ proto int xml_set_end_namespace_decl_handler(resource parser, string hdl)
|
||||
Set up character data handler */
|
||||
PHP_FUNCTION(xml_set_end_namespace_decl_handler)
|
||||
{
|
||||
@@ -1435,7 +1435,7 @@ PHP_FUNCTION(xml_set_end_namespace_decl_handler)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_parse(resource parser, string data [, int isFinal])
|
||||
/* {{{ proto int xml_parse(resource parser, string data [, int isFinal])
|
||||
Start parsing an XML document */
|
||||
PHP_FUNCTION(xml_parse)
|
||||
{
|
||||
@@ -1471,8 +1471,8 @@ PHP_FUNCTION(xml_parse_into_struct)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsZ|Z", &pind, &data, &data_len, &xdata, &info) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (info) {
|
||||
|
||||
if (info) {
|
||||
zval_dtor(*info);
|
||||
array_init(*info);
|
||||
}
|
||||
@@ -1483,11 +1483,11 @@ PHP_FUNCTION(xml_parse_into_struct)
|
||||
array_init(*xdata);
|
||||
|
||||
parser->data = *xdata;
|
||||
|
||||
|
||||
if (info) {
|
||||
parser->info = *info;
|
||||
}
|
||||
|
||||
|
||||
parser->level = 0;
|
||||
parser->ltags = safe_emalloc(XML_MAXLEVEL, sizeof(char *), 0);
|
||||
|
||||
@@ -1503,7 +1503,7 @@ PHP_FUNCTION(xml_parse_into_struct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_get_error_code(resource parser)
|
||||
/* {{{ proto int xml_get_error_code(resource parser)
|
||||
Get XML parser error code */
|
||||
PHP_FUNCTION(xml_get_error_code)
|
||||
{
|
||||
@@ -1537,7 +1537,7 @@ PHP_FUNCTION(xml_error_string)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_get_current_line_number(resource parser)
|
||||
/* {{{ proto int xml_get_current_line_number(resource parser)
|
||||
Get current line number for an XML parser */
|
||||
PHP_FUNCTION(xml_get_current_line_number)
|
||||
{
|
||||
@@ -1569,7 +1569,7 @@ PHP_FUNCTION(xml_get_current_column_number)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_get_current_byte_index(resource parser)
|
||||
/* {{{ proto int xml_get_current_byte_index(resource parser)
|
||||
Get current byte index for an XML parser */
|
||||
PHP_FUNCTION(xml_get_current_byte_index)
|
||||
{
|
||||
@@ -1585,7 +1585,7 @@ PHP_FUNCTION(xml_get_current_byte_index)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_parser_free(resource parser)
|
||||
/* {{{ proto int xml_parser_free(resource parser)
|
||||
Free an XML parser */
|
||||
PHP_FUNCTION(xml_parser_free)
|
||||
{
|
||||
@@ -1611,7 +1611,7 @@ PHP_FUNCTION(xml_parser_free)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_parser_set_option(resource parser, int option, mixed value)
|
||||
/* {{{ proto int xml_parser_set_option(resource parser, int option, mixed value)
|
||||
Set options in an XML parser */
|
||||
PHP_FUNCTION(xml_parser_set_option)
|
||||
{
|
||||
@@ -1657,7 +1657,7 @@ PHP_FUNCTION(xml_parser_set_option)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int xml_parser_get_option(resource parser, int option)
|
||||
/* {{{ proto int xml_parser_get_option(resource parser, int option)
|
||||
Get options from an XML parser */
|
||||
PHP_FUNCTION(xml_parser_get_option)
|
||||
{
|
||||
@@ -1687,7 +1687,7 @@ PHP_FUNCTION(xml_parser_get_option)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string utf8_encode(string data)
|
||||
/* {{{ proto string utf8_encode(string data)
|
||||
Encodes an ISO-8859-1 string to UTF-8 */
|
||||
PHP_FUNCTION(utf8_encode)
|
||||
{
|
||||
@@ -1707,7 +1707,7 @@ PHP_FUNCTION(utf8_encode)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto string utf8_decode(string data)
|
||||
/* {{{ proto string utf8_decode(string data)
|
||||
Converts a UTF-8 encoded string to ISO-8859-1 */
|
||||
PHP_FUNCTION(utf8_decode)
|
||||
{
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<records>
|
||||
|
||||
<record><aaa><bbbb><ccc><![CDATA[XXX Xxxxxxxxxxxx]]></ccc><ddd><![CDATA[XXX Xx]]></ddd></bbbb><eee><![CDATA[Xxxxx xxxxxxx: xxxx://xxx.xxx.xx.xx/xxxx?xxxxXx=0xx000x0-000x-0xx0-x000-x0000xx0xx00
|
||||
Xxxxxxxxxxxx xx Xxxxxxxxxxxx Xxxxxxxxx xx Xxxxxxxxx Xxxxxxxxxxxx Xxxxxxxxxxx Xxxxxxxxxxxx (XXX Xxxxxxxxxxxx), xxxxxxxxx xxxxxxx xx Xxx Xxxxxxxxxx Xxxxxxxxxx Xxx.]]></eee></aaa><fff><bbbb><ggg><![CDATA[Xxxxxxxxx Xxxxxxxxxxxxxxx Xxxxxxxxxx xx Xxxxxxxxxxxx]]></ggg><ccc><![CDATA[XXX Xxxxxxxxxxxx]]></ccc></bbbb><hhh><![CDATA[Xx xxxxx, xx xxxxxxxxxxx XXX Xxxxxxxxxxxx x xxxxxcé x’xxxxxxxx xxx x’Xxxxxxléx léxxxxxxxxx xx xx xxxxxxxx xx xx Xxxxxxxxxx Xxxxxxxxxx Xxx (xxx xxx xx xxxxxxxxxx xxxxxxxxx). Xxxxx xxx xréxxxx xxx xxxxxx xxx déxxxxxxxx XXX Xxxxxxxxxxxx xx xxxx xx’xxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxréxxxxxxtéx xx xxxxxxx xxx XX, xxx XXX xx xxx XXX xx xx xxxxxxxx xx xxxxx x’xxxxxxxx xx xxxxx xx xxxxxxxxx xxxxxxxxxxxxx xxréé (XXX). (Xxxxxxxxéx XXX - Xxx 0000)]]></hhh></fff></record>
|
||||
|
||||
</records>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<records>
|
||||
|
||||
<record><aaa><bbbb><ddd><![CDATA[XXX Xx]]></ddd></bbbb><eee><![CDATA[Xxxxx xxxxxxx: xxxx://xxx.xxx.xx.xx/xxxx?xxxxXx=0xx000x0-000x-0xx0-x000-x0000xx0xx00
|
||||
Xxxxxxxxxxxx xx Xxxxxxxxxxxx Xxxxxxxxx xx Xxxxxxxxx Xxxxxxxxxxxx Xxxxxxxxxxx Xxxxxxxxxxxx (XXX Xxxxxxxxxxxx), xxxxxxxxx xxxxxxx xx Xxx Xxxxxxxxxx Xxxxxxxxxx Xxx.]]></eee></aaa><fff><bbbb><ggg><![CDATA[Xxxxxxxxx Xxxxxxxxxxxxxxx Xxxxxxxxxx xx Xxxxxxxxxxxx]]></ggg><ccc><![CDATA[XXX Xxxxxxxxxxxx]]></ccc></bbbb><hhh><![CDATA[Xx xxxxx, xx xxxxxxxxxxx XXX Xxxxxxxxxxxx x xxxxxcé x’xxxxxxxx xxx x’Xxxxxxléx léxxxxxxxxx xx xx xxxxxxxx xx xx Xxxxxxxxxx Xxxxxxxxxx Xxx (xxx xxx xx xxxxxxxxxx xxxxxxxxx). Xxxxx xxx xréxxxx xxx xxxxxx xxx déxxxxxxxx XXX Xxxxxxxxxxxx xx xxxx xx’xxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxréxxxxxxtéx xx xxxxxxx xxx XX, xxx XXX xx xxx XXX xx xx xxxxxxxx xx xxxxx x’xxxxxxxx xx xxxxx xx xxxxxxxxx xxxxxxxxxxxxx xxréé (XXX). (Xxxxxxxxéx XXX - Xxx 0000)]]></hhh></fff></record>
|
||||
|
||||
</records>
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
XMLReader: Bug #71805 XML files can generate UTF-8 error even if they are UTF-8
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("xmlreader")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
TestXML(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'XMLReaderGood_bug71805.xml');
|
||||
TestXML(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'XMLReaderBad_bug71805.xml');
|
||||
|
||||
function TestXML($file) {
|
||||
$XR = new XMLReader;
|
||||
$XR->open($file, null, LIBXML_NOBLANKS);
|
||||
|
||||
while (($lastRead = $XR->read()) && ($XR->name !== 'records'));
|
||||
while (($lastRead = $XR->read()) && ($XR->name !== 'record'));
|
||||
while ($lastRead) {
|
||||
$xml = $XR->readOuterXML();
|
||||
if ($xml === '') {
|
||||
$err = '';
|
||||
if ($e = libxml_get_last_error()) { $err = $e->message.' (line: '.$e->line.')'; }
|
||||
$XR->close();
|
||||
echo $file.' : Problem with file'.($err ? ' — '.$err : '').'.';
|
||||
echo "\n";
|
||||
return;
|
||||
}
|
||||
while (($lastRead = $XR->next()) && ($XR->name !== 'record'));
|
||||
}
|
||||
$XR->close();
|
||||
echo $file.' : Good!';
|
||||
echo "\n";
|
||||
return;
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
%sXMLReaderGood_bug71805.xml : Good!
|
||||
%sXMLReaderBad_bug71805.xml : Good!
|
||||
===DONE===
|
||||
@@ -3,7 +3,6 @@ Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("xmlrpc")) print "skip";
|
||||
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -27,5 +26,5 @@ object(stdClass)#1 (2) {
|
||||
["xmlrpc_type"]=>
|
||||
string(6) "base64"
|
||||
["scalar"]=>
|
||||
float(73588229205)
|
||||
int(73588229205)
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("xmlrpc")) print "skip";
|
||||
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$obj = new stdClass;
|
||||
$obj->xmlrpc_type = 'base64';
|
||||
$obj->scalar = 0x1122334455;
|
||||
var_dump(xmlrpc_encode($obj));
|
||||
var_dump($obj);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(135) "<?xml version="1.0" encoding="utf-8"?>
|
||||
<params>
|
||||
<param>
|
||||
<value>
|
||||
<base64>NzM1ODgyMjkyMDU= </base64>
|
||||
</value>
|
||||
</param>
|
||||
</params>
|
||||
"
|
||||
object(stdClass)#1 (2) {
|
||||
["xmlrpc_type"]=>
|
||||
string(6) "base64"
|
||||
["scalar"]=>
|
||||
int(73588229205)
|
||||
}
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 6
|
||||
#define PHP_RELEASE_VERSION 22
|
||||
#define PHP_EXTRA_VERSION "RC1"
|
||||
#define PHP_VERSION "5.6.22RC1"
|
||||
#define PHP_VERSION_ID 50622
|
||||
#define PHP_RELEASE_VERSION 20
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.6.20"
|
||||
#define PHP_VERSION_ID 50620
|
||||
@@ -967,7 +967,6 @@ cli_server.color = On
|
||||
; happens within intl functions. The value is the level of the error produced.
|
||||
; Default is 0, which does not produce any errors.
|
||||
;intl.error_level = E_WARNING
|
||||
;intl.use_exceptions = 0
|
||||
|
||||
[sqlite3]
|
||||
;sqlite3.extension_dir =
|
||||
|
||||
@@ -967,7 +967,6 @@ cli_server.color = On
|
||||
; happens within intl functions. The value is the level of the error produced.
|
||||
; Default is 0, which does not produce any errors.
|
||||
;intl.error_level = E_WARNING
|
||||
;intl.use_exceptions = 0
|
||||
|
||||
[sqlite3]
|
||||
;sqlite3.extension_dir =
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
FPM: Test status page
|
||||
--SKIPIF--
|
||||
<?php include "skipif.inc"; ?>
|
||||
--XFAIL--
|
||||
randomly intermittently failing all the time in CI, with diff:
|
||||
017+ active processes: 0
|
||||
018+ total processes: 1
|
||||
017- active processes: 1
|
||||
018- total processes: 2
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -13,4 +13,4 @@ libssh2-1.7.0
|
||||
libtidy-20090406
|
||||
libxslt-1.1.27
|
||||
libxml-2.9.3
|
||||
openssl-1.0.1t
|
||||
openssl-1.0.1s
|
||||
Reference in new issue
Block a user