Compare commits

...
16 Commits
Author SHA1 Message Date
Stanislav Malyshev 73915a2bd6 Fix bug #74087
Ported from https://vcs.pcre.org/pcre/code/trunk/pcre_jit_compile.c?r1=1676&r2=1680&view=patch
2017-07-06 09:49:28 +01:00
Nikita Popov 61ba5f8477 Fixed bug #74111 2017-07-06 09:48:52 +01:00
Joe Watkins 498aa0ec97 news entry for 74819 2017-07-06 09:32:12 +01:00
Derick Rethans 2c74a57118 Fixed parsing of strange formats with mixed month/day and time strings 2017-07-06 09:26:15 +01:00
Joe Watkins 77072a0946 news entry for 74651 2017-07-06 08:34:49 +01:00
Stanislav Malyshev 91826a311d Fix bug #74651 - check EVP_SealInit as it can return -1 2017-07-06 08:25:09 +01:00
Joe Watkins ec664bd26d news entry for 74603 2017-07-06 08:18:27 +01:00
Joe Watkins a938133d89 news entry for 74111 2017-07-06 08:17:33 +01:00
Joe Watkins 53b7c63c5e news entry for 74435 2017-07-06 08:15:12 +01:00
Christoph M. Becker 0180921255 Fix #74435: Buffer over-read into uninitialized memory
The stack allocated color map buffers were not zeroed before usage, and
so undefined palette indexes could cause information leakage.
2017-07-06 07:44:25 +01:00
Stanislav Malyshev 88c521d659 Fix bug #74603 - use correct buffer size 2017-07-06 07:43:43 +01:00
Remi Collet 7378e7bdc8 Adapt for 32-bits which fails at different offset (49 vs 38) 2017-07-06 07:02:17 +01:00
Anatol Belski d9b0835dfd fix datatype 2017-07-06 07:01:53 +01:00
Joe Watkins ef9d35cdc9 set versions 2017-07-04 20:10:59 +01:00
Anatol Belski 2c567eae28 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74101 and bug #74614
2017-07-04 20:07:00 +01:00
Joe Watkins 3d7b2117e0 set versions for 7.1.7RC1 2017-06-20 17:29:01 +01:00
20 changed files with 7671 additions and 6909 deletions

No files matched your search

+14 -1
View File
@@ -1,6 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017, PHP 7.1.7
06 Jul 2017, PHP 7.1.7
- Core:
. Fixed bug #74738 (Multiple [PATH=] and [HOST=] sections not properly
@@ -8,6 +8,14 @@ PHP NEWS
. Fixed bug #74658 (Undefined constants in array properties result in broken
properties). (Laruence)
. Fixed misparsing of abstract unix domain socket names. (Sara)
. Fixed bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability).
(Stas)
. Fixed bug #74101, bug #74614 (Unserialize Heap Use-After-Free (READ: 1) in
zval_get_type). (Nikita)
. Fixed bug #74111 (Heap buffer overread (READ: 1) finish_nested_data from
unserialize). (Nikita)
. Fixed bug #74819 (wddx_deserialize() heap out-of-bound read via
php_parse_date()). (Derick)
- Date:
. Fixed bug #74639 (implement clone for DatePeriod and DateInterval).
@@ -16,6 +24,9 @@ PHP NEWS
- DOM:
. Fixed bug #69373 (References to deleted XPath query results). (ttoohey)
- GD:
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
- Intl:
. Fixed bug #73473 (Stack Buffer Overflow in msgfmt_parse_message). (libnex)
. Fixed bug #74705 (Wrong reflection on Collator::getSortKey and
@@ -36,6 +47,8 @@ PHP NEWS
- OpenSSL:
. Fixed bug #74720 (pkcs7_en/decrypt does not work if \x1a is used in
content). (Anatol)
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
(Stas)
- PDO_OCI:
. Support Instant Client 12.2 in --with-pdo-oci configure option.
+1
View File
@@ -0,0 +1 @@
0=0&~2000000000
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #74603 (PHP INI Parsing Stack Buffer Overflow Vulnerability)
--SKIPIF--
<?php
if (PHP_INT_MAX !== 2147483647)
die('skip for 32-bit only');
--FILE--
<?php
var_dump(parse_ini_file(__DIR__ . "/bug74603.ini", true, INI_SCANNER_NORMAL));
?>
--EXPECT--
array(1) {
[0]=>
string(1) "0"
}
+1 -1
View File
@@ -55,7 +55,7 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
int i_result;
int i_op1, i_op2;
int str_len;
char str_result[MAX_LENGTH_OF_LONG];
char str_result[MAX_LENGTH_OF_LONG+1];
i_op1 = atoi(Z_STRVAL_P(op1));
zend_string_free(Z_STR_P(op1));
+1 -1
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=1
PHP_RELEASE_VERSION=7
PHP_EXTRA_VERSION="-dev"
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`
+7485 -6852
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -913,7 +913,7 @@ datefull = day ([ \t.-])* monthtext ([ \t.-])* year;
datenoday = monthtext ([ .\t-])* year4;
datenodayrev = year4 ([ .\t-])* monthtext;
datetextual = monthtext ([ .\t-])* day [,.stndrh\t ]+ year;
datenoyear = monthtext ([ .\t-])* day [,.stndrh\t ]*;
datenoyear = monthtext ([ .\t-])* day ([,.stndrh\t ]+|[\000]);
datenoyearrev = day ([ .\t-])* monthtext;
datenocolon = year4 monthlz daylz;
+3
View File
@@ -147,6 +147,9 @@ gdImagePtr gdImageCreateFromGifCtx(gdIOCtxPtr fd) /* {{{ */
int haveGlobalColormap;
gdImagePtr im = 0;
memset(ColorMap, 0, 3 * MAXCOLORMAPSIZE);
memset(localColorMap, 0, 3 * MAXCOLORMAPSIZE);
/*1.4//imageNumber = 1; */
if (! ReadOK(fd,buf,6)) {
return 0;
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #74435 (Buffer over-read into uninitialized memory)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreatefromgif(__DIR__ . DIRECTORY_SEPARATOR . 'bug74435.gif');
var_dump($im);
$width = imagesx($im);
$height = imagesy($im);
for ($i = 0; $i < $width; $i += 16) {
for ($j = 0; $j < $height; $j += 16) {
if (($index = imagecolorat($im, $i, $j)) >= 2) {
list($red, $green, $blue, $alpha) = array_values(imagecolorsforindex($im, $index));
if ($red !== 0 || $green !== 0 || $blue !== 0 || $alpha !== 0) {
echo "unexpected color at ($i, $j)\n";
}
}
}
}
?>
===DONE===
--EXPECTF--
resource(%d) of type (gd)
===DONE===
+1 -1
View File
@@ -5926,7 +5926,7 @@ PHP_FUNCTION(openssl_seal)
buf = emalloc(data_len + EVP_CIPHER_CTX_block_size(ctx));
EVP_CIPHER_CTX_cleanup(ctx);
if (!EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) ||
if (EVP_SealInit(ctx, cipher, eks, eksl, &iv_buf[0], pkeys, nkeys) <= 0 ||
!EVP_SealUpdate(ctx, buf, &len1, (unsigned char *)data, (int)data_len) ||
!EVP_SealFinal(ctx, buf + len1, &len2)) {
efree(buf);
+27
View File
@@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIEoDCCBAmgAwIBAgIBJzANBgkqhkiG9w0BAQQFADCBkDELMAkGA1UEFhMCUk8x
EDAOBgNVBAgTB1JvbWFuaWExEDAOBgNVBAcTB0NyYWlvdmExDzANBgNVBAoTBlNl
cmdpdTETMBEGA1UECxMKU2VyZ2l1IFNSTDESMBAGA1UEAxMJU2VyZ2l1IENBMSMw
IQYJKoZIhvcNAQkBFhRuX3NlcmdpdUBob3RtYWlsLmNvbTAeFw0wNDA1MTQxMzM0
NTZaFw0wNTA1MTQxMzM0NTZaMIGaMQswCQYDVQQGEwJSTzEQMA4GA1UECBMHUm9t
YW5pYTEQMA4GA1UEBxMHQ3JhaW92YTETMBEGA1UEChMKU2VyZ2l1IFNSTDETMBEG
A1UECxMKU2VyZ2l1IFNSTDEYMBYGA1UEAxMPU2VyZ2l1IHBlcnNvbmFsMSMwIQYJ
KoZIhvcNAQkBFhRuX3NlcmdpdUBob3RtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEF
AAOBjQAwgYkCgYEApNj7XXz8T8FcLIWpBniPYom3QcT6T7u0xRPHqtqzj5oboBYp
DJe5d354/y0gJTpiLt8+fTrPgWXnbHm3pOHgXzTcX6Arani0GDU0/xDi4VkCRGcS
YqX2sJpcDzAbmK9UDMt3xf/O1B8AJan3RfO0Bm3ozTEPziLMkmsiYr5b/L4CAwEA
AaOCAfwwggH4MAkGA1UdEwQCMAAwNQYJYIZIAYb4QgENBCgWJkZvciBHcmlkIHVz
ZSBvbmx5OyByZXF1ZXN0IHRhZyB1c2VyVGFnMBEGCWCGSAGG+EIBAQQEAwIF4DA/
BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vbW9iaWxlLmJsdWUtc29mdHdhcmUucm86
OTAvY2EvY3JsLnNodG1sMDUGCWCGSAGG+EIBCAQoFiZodHRwOi8vbW9iaWxlLmJs
dWUtc29mdHdhcmUucm86OTAvcHViLzAhBgNVHREEGjAYgRZzZXJnaXVAYmx1ZXNv
ZnR3YXJlLnJvMB0GA1UdDgQWBBSwp//5QRXeIzm93TEPl6CyonTg/DCBpwYDVR0j
BIGfMIGcoYGWpIGTMIGQMQswCQYDVQQGEwJSTzEQMA4GA1UECBMHUm9tYW5pYTEQ
MA4GA1UEBxMHQ3JhaW92YTEPMA0GA1UEChMGU2VyZ2l1MRMwEQYDVQQLEwpTZXJn
aXUgU1JMMRIwEAYDVQQDEwlTZXJnaXUgQ0ExIzAhBgkqhkiG9w0BCQEWFG5fc2Vy
Z2l1QGhvdG1haWwuY29tggEAMAsGA1UdDwQEAwIE8DAjBglghkgBhvhCAQIEFhYU
aHR0cDovLzYyLjIzMS45OC41Mi8wCwYDKgMEBAQ+52I0MA0GCSqGSIb3DQEBBAUA
A4GBAIBIOJ+iiLyQfNJEY+IMefayQea0nmuXYY+F+L1DFjSC7xChytgYoPNnKkhh
3dWPtxbswiqKYUnGi6y3Hi4UhDsOaDW29t2S305hSc2qgjOiNtRYQIVYQ8EHG1k7
Fl63S7uCOhnVJt+4MnUK1N6/pwgsp+Z2GvEsDG1qCKnvNpf6
-----END CERTIFICATE-----
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #74651: negative-size-param (-1) in memcpy in zif_openssl_seal()
--SKIPIF--
<?php
if (!extension_loaded("openssl")) die("skip openssl not loaded");
?>
--FILE--
<?php
$inputstr = file_get_contents(__DIR__ . "/74651.pem");
$pub_key_id = openssl_get_publickey($inputstr);
var_dump($pub_key_id);
var_dump(openssl_seal($inputstr, $sealed, $ekeys, array($pub_key_id, $pub_key_id), 'AES-128-ECB'));
?>
--EXPECTF--
resource(%d) of type (OpenSSL key)
bool(false)
+1 -1
View File
@@ -7307,7 +7307,7 @@ if (opcode == OP_COND || opcode == OP_SCOND)
if (*matchingpath == OP_FAIL)
stacksize = 0;
if (*matchingpath == OP_RREF)
else if (*matchingpath == OP_RREF)
{
stacksize = GET2(matchingpath, 1);
if (common->currententry == NULL)
+1 -1
View File
@@ -42,7 +42,7 @@ bool(false)
Notice: unserialize(): Error at offset 17 of 33 bytes in %sbug25378.php on line %d
bool(false)
Notice: unserialize(): Error at offset 33 of 32 bytes in %sbug25378.php on line %d
Notice: unserialize(): Error at offset 32 of 32 bytes in %sbug25378.php on line %d
bool(false)
Notice: unserialize(): Error at offset 2 of 13 bytes in %sbug25378.php on line %d
@@ -0,0 +1,10 @@
--TEST--
Bug #74101: Unserialize Heap Use-After-Free (READ: 1) in zval_get_type
--FILE--
<?php
$s = 'O:9:"Exception":799999999999999999999999999997:0i:0;a:0:{}i:2;i:0;i:0;R:2;';
var_dump(unserialize($s));
?>
--EXPECTF--
Notice: unserialize(): Error at offset 48 of 74 bytes in %s on line %d
bool(false)
@@ -0,0 +1,10 @@
--TEST--
Bug #74614: Use-after-free in PHP7's unserialize()
--FILE--
<?php
unserialize('a:3020000000000000000000000000000001:{i:0;a:0:{}i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:7;i:8;i:8;R:2;}');
?>
--EXPECTF--
Notice: unserialize(): Error at offset %d of 113 bytes in %s on line %d
+42 -39
View File
@@ -473,13 +473,12 @@ string_key:
static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
{
if (*((*p)++) == '}')
return 1;
if (*p >= max || **p != '}') {
return 0;
}
#if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
zval_ptr_dtor(rval);
#endif
return 0;
(*p)++;
return 1;
}
static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
@@ -548,6 +547,10 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
&& zend_hash_str_exists(&Z_OBJCE_P(rval)->function_table, "__wakeup", sizeof("__wakeup")-1);
ht = Z_OBJPROP_P(rval);
if (elements >= HT_MAX_SIZE - zend_hash_num_elements(ht)) {
return 0;
}
zend_hash_extend(ht, zend_hash_num_elements(ht) + elements, (ht->u.flags & HASH_FLAG_PACKED));
if (!process_nested_data(UNSERIALIZE_PASSTHRU, ht, elements, 1)) {
if (has_wakeup) {
@@ -617,7 +620,7 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
start = cursor;
#line 621 "ext/standard/var_unserializer.c"
#line 624 "ext/standard/var_unserializer.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -675,9 +678,9 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
yy2:
++YYCURSOR;
yy3:
#line 998 "ext/standard/var_unserializer.re"
#line 1001 "ext/standard/var_unserializer.re"
{ return 0; }
#line 681 "ext/standard/var_unserializer.c"
#line 684 "ext/standard/var_unserializer.c"
yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy17;
@@ -724,13 +727,13 @@ yy14:
goto yy3;
yy15:
++YYCURSOR;
#line 992 "ext/standard/var_unserializer.re"
#line 995 "ext/standard/var_unserializer.re"
{
/* this is the case where we have less data than planned */
php_error_docref(NULL, E_NOTICE, "Unexpected end of serialized data");
return 0; /* not sure if it should be 0 or 1 here? */
}
#line 734 "ext/standard/var_unserializer.c"
#line 737 "ext/standard/var_unserializer.c"
yy17:
yych = *++YYCURSOR;
if (yybm[0+yych] & 128) {
@@ -742,13 +745,13 @@ yy18:
goto yy3;
yy19:
++YYCURSOR;
#line 676 "ext/standard/var_unserializer.re"
#line 679 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_NULL(rval);
return 1;
}
#line 752 "ext/standard/var_unserializer.c"
#line 755 "ext/standard/var_unserializer.c"
yy21:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -998,7 +1001,7 @@ yy62:
goto yy18;
yy63:
++YYCURSOR;
#line 625 "ext/standard/var_unserializer.re"
#line 628 "ext/standard/var_unserializer.re"
{
zend_long id;
@@ -1024,7 +1027,7 @@ yy63:
return 1;
}
#line 1028 "ext/standard/var_unserializer.c"
#line 1031 "ext/standard/var_unserializer.c"
yy65:
yych = *++YYCURSOR;
if (yych == '"') goto yy84;
@@ -1035,13 +1038,13 @@ yy66:
goto yy18;
yy67:
++YYCURSOR;
#line 682 "ext/standard/var_unserializer.re"
#line 685 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_BOOL(rval, parse_iv(start + 2));
return 1;
}
#line 1045 "ext/standard/var_unserializer.c"
#line 1048 "ext/standard/var_unserializer.c"
yy69:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
@@ -1061,7 +1064,7 @@ yy69:
}
yy71:
++YYCURSOR;
#line 730 "ext/standard/var_unserializer.re"
#line 733 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
use_double:
@@ -1070,7 +1073,7 @@ use_double:
ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL));
return 1;
}
#line 1074 "ext/standard/var_unserializer.c"
#line 1077 "ext/standard/var_unserializer.c"
yy73:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1092,7 +1095,7 @@ yy75:
goto yy18;
yy76:
++YYCURSOR;
#line 688 "ext/standard/var_unserializer.re"
#line 691 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
int digits = YYCURSOR - start - 3;
@@ -1118,14 +1121,14 @@ yy76:
ZVAL_LONG(rval, parse_iv(start + 2));
return 1;
}
#line 1122 "ext/standard/var_unserializer.c"
#line 1125 "ext/standard/var_unserializer.c"
yy78:
yych = *++YYCURSOR;
if (yych == '"') goto yy92;
goto yy18;
yy79:
++YYCURSOR;
#line 651 "ext/standard/var_unserializer.re"
#line 654 "ext/standard/var_unserializer.re"
{
zend_long id;
@@ -1150,14 +1153,14 @@ yy79:
return 1;
}
#line 1154 "ext/standard/var_unserializer.c"
#line 1157 "ext/standard/var_unserializer.c"
yy81:
yych = *++YYCURSOR;
if (yych == '"') goto yy94;
goto yy18;
yy82:
++YYCURSOR;
#line 840 "ext/standard/var_unserializer.re"
#line 843 "ext/standard/var_unserializer.re"
{
size_t len, len2, len3, maxlen;
zend_long elements;
@@ -1309,10 +1312,10 @@ yy82:
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
#line 1313 "ext/standard/var_unserializer.c"
#line 1316 "ext/standard/var_unserializer.c"
yy84:
++YYCURSOR;
#line 771 "ext/standard/var_unserializer.re"
#line 774 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
zend_string *str;
@@ -1346,17 +1349,17 @@ yy84:
ZVAL_STR(rval, str);
return 1;
}
#line 1350 "ext/standard/var_unserializer.c"
#line 1353 "ext/standard/var_unserializer.c"
yy86:
++YYCURSOR;
#line 805 "ext/standard/var_unserializer.re"
#line 808 "ext/standard/var_unserializer.re"
{
zend_long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
*p = YYCURSOR;
if (!var_hash) return 0;
if (elements < 0) {
if (elements < 0 || elements >= HT_MAX_SIZE) {
return 0;
}
@@ -1373,7 +1376,7 @@ yy86:
return finish_nested_data(UNSERIALIZE_PASSTHRU);
}
#line 1377 "ext/standard/var_unserializer.c"
#line 1380 "ext/standard/var_unserializer.c"
yy88:
yych = *++YYCURSOR;
if (yych <= ',') {
@@ -1398,21 +1401,21 @@ yy91:
goto yy18;
yy92:
++YYCURSOR;
#line 829 "ext/standard/var_unserializer.re"
#line 832 "ext/standard/var_unserializer.re"
{
long elements;
zend_long elements;
if (!var_hash) return 0;
elements = object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR);
if (elements < 0) {
if (elements < 0 || elements >= HT_MAX_SIZE) {
return 0;
}
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
#line 1413 "ext/standard/var_unserializer.c"
#line 1416 "ext/standard/var_unserializer.c"
yy94:
++YYCURSOR;
#line 739 "ext/standard/var_unserializer.re"
#line 742 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
char *str;
@@ -1444,7 +1447,7 @@ yy94:
ZVAL_STRINGL(rval, str, len);
return 1;
}
#line 1448 "ext/standard/var_unserializer.c"
#line 1451 "ext/standard/var_unserializer.c"
yy96:
yych = *++YYCURSOR;
if (yych <= '/') goto yy18;
@@ -1452,7 +1455,7 @@ yy96:
goto yy18;
yy97:
++YYCURSOR;
#line 714 "ext/standard/var_unserializer.re"
#line 717 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
@@ -1468,9 +1471,9 @@ yy97:
return 1;
}
#line 1472 "ext/standard/var_unserializer.c"
#line 1475 "ext/standard/var_unserializer.c"
}
#line 1000 "ext/standard/var_unserializer.re"
#line 1003 "ext/standard/var_unserializer.re"
return 0;
+12 -9
View File
@@ -477,13 +477,12 @@ string_key:
static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
{
if (*((*p)++) == '}')
return 1;
if (*p >= max || **p != '}') {
return 0;
}
#if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE
zval_ptr_dtor(rval);
#endif
return 0;
(*p)++;
return 1;
}
static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
@@ -552,6 +551,10 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, zend_long elements)
&& zend_hash_str_exists(&Z_OBJCE_P(rval)->function_table, "__wakeup", sizeof("__wakeup")-1);
ht = Z_OBJPROP_P(rval);
if (elements >= HT_MAX_SIZE - zend_hash_num_elements(ht)) {
return 0;
}
zend_hash_extend(ht, zend_hash_num_elements(ht) + elements, (ht->u.flags & HASH_FLAG_PACKED));
if (!process_nested_data(UNSERIALIZE_PASSTHRU, ht, elements, 1)) {
if (has_wakeup) {
@@ -808,7 +811,7 @@ use_double:
*p = YYCURSOR;
if (!var_hash) return 0;
if (elements < 0) {
if (elements < 0 || elements >= HT_MAX_SIZE) {
return 0;
}
@@ -827,11 +830,11 @@ use_double:
}
"o:" iv ":" ["] {
long elements;
zend_long elements;
if (!var_hash) return 0;
elements = object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR);
if (elements < 0) {
if (elements < 0 || elements >= HT_MAX_SIZE) {
return 0;
}
return object_common2(UNSERIALIZE_PASSTHRU, elements);
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 1
#define PHP_RELEASE_VERSION 7
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.1.6-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.1.7"
#define PHP_VERSION_ID 70107