Compare commits

..
Author SHA1 Message Date
Ferenc Kovacs e42bdcb7aa add missing NEWS entries 2016-10-14 13:03:12 +02:00
Remi Collet 49fc016eb9 use zend_error instead of zend_error_noreturn 2016-10-14 13:01:22 +02:00
Ferenc Kovacs 7de5c80d14 5.6.27 2016-10-13 02:15:09 +02:00
Stanislav Malyshev 06721070a4 Apparently negative wordwrap is a thing and should work as length = 0.
I'll leave it as is for now.
2016-10-13 01:53:56 +02:00
Stanislav Malyshev 28ed09929c Really fix bug #73017 2016-10-13 01:53:28 +02:00
Stanislav Malyshev 03df764d1c Merge branch 'PHP-5.6.27' into PHP-5.6
* PHP-5.6.27:
  Fix tests
  fix tsrm
  Fix bug #73284 - heap overflow in php_ereg_replace function
  Fix bug #73276 - crash in openssl_random_pseudo_bytes function
  Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
  fix bug #73275 - crash in openssl_encrypt function
  Fix for #73240 - Write out of bounds at number_format
  Bug #73218: add mitigation for ICU int overflow
  Add more locale length checks, due to ICU bugs.
  Fix bug #73208 - another missing length check
  Fix bug #73190: memcpy negative parameter _bc_new_num_ex
  Fix bug #73189 - Memcpy negative size parameter php_resolve_path
  Fixed bug #73174 - heap overflow in php_pcre_replace_impl
  Fix bug #73150: missing NULL check in dom_document_save_html
  Fix bug #73147: Use After Free in PHP7 unserialize()
  Fix bug #73082
  Fix bug #73073 - CachingIterator null dereference when convert to string
2016-10-13 01:35:22 +02:00
Ferenc Kovacs 211f30c2c8 Revert "Updated to version 2016.7 (2016g)"
This reverts commit 6a544f2d1e.
2016-09-29 01:34:45 +02:00
Ferenc Kovacs 2119b0d41d 5.6.27RC1 2016-09-29 01:06:51 +02:00
98 changed files with 3197 additions and 4110 deletions

No files matched your search

-74
View File
@@ -1,77 +1,5 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
08 Dec 2016, PHP 5.6.29
- Mysqlnd:
. Fixed bug #64526 (Add missing mysqlnd.* parameters to php.ini-*). (cmb)
- Opcache:
. Fixed bug #73402 (Opcache segfault when using class constant to call a
method). (Laruence)
. Fixed bug #69090 (check cached files permissions)
- OpenSSL
. Fixed bug #72776 (Invalid parameter in memcpy function trough
openssl_pbkdf2). (Jakub Zelenka)
- Postgres:
. Fixed bug #73498 (Incorrect SQL generated for pg_copy_to()). (Craig Duncan)
- SOAP:
. Fixed bug #73452 (Segfault (Regression for #69152)). (Dmitry)
- SQLite3:
. Fixed bug #73530 (Unsetting result set may reset other result set). (cmb)
- Standard:
. Fixed bug #73297 (HTTP stream wrapper should ignore HTTP 100 Continue).
(rowan dot collins at gmail dot com)
- WDDX:
. Fixed bug #73631 (Memory leak due to invalid wddx stack processing).
(bughunter at fosec dot vn).
10 Nov 2016, PHP 5.6.28
- Core:
. Fixed bug #73337 (try/catch not working with two exceptions inside a same
operation). (Dmitry)
- Bz2:
. Fixed bug #73356 (crash in bzcompress function). (Stas)
-GD:
. Fixed bug #73213 (Integer overflow in imageline() with antialiasing). (cmb)
. Fixed bug #73272 (imagescale() is not affected by, but affects
imagesetinterpolation()). (cmb)
. Fixed bug #73279 (Integer overflow in gdImageScaleBilinearPalette()). (cmb)
. Fixed bug #73280 (Stack Buffer Overflow in GD dynamicGetbuf). (cmb)
. Fixed bug #72482 (Illegal write/read access caused by gdImageAALine overflow).
(cmb)
. Fixed bug #72696 (imagefilltoborder stackoverflow on truecolor images). (cmb)
- Imap:
. Fixed bug #73418 (Integer Overflow in "_php_imap_mail" leads Heap Overflow).
(Anatol)
- SPL:
. Fixed bug #73144 (Use-after-free in ArrayObject Deserialization). (Stas)
- SOAP:
. Fixed bug #73037 (SoapServer reports Bad Request when gzipped). (Anatol)
- SQLite3:
. Fixed bug #73333 (2147483647 is fetched as string). (cmb)
- Standard:
. Fixed bug #73203 (passing additional_parameters causes mail to fail). (cmb)
. Fixed bug #73188 (use after free in userspace streams). (Sara)
. Fixed bug #73192 (parse_url return wrong hostname). (Nikita)
- Wddx:
. Fixed bug #73331 (NULL Pointer Dereference in WDDX Packet Deserialization
with PDORow). (Stas)
13 Oct 2016, PHP 5.6.27
- Core:
@@ -322,8 +250,6 @@ PHP NEWS
. Fixed bug #72697 (select_colors write out-of-bounds). (Stas)
. Fixed bug #72709 (imagesetstyle() causes OOB read for empty $styles). (cmb)
. Fixed bug #72730 (imagegammacorrect allows arbitrary write access). (Stas)
. Fixed bug #72494 (imagecropauto out-of-bounds access). (Fernando, Pierre,
cmb)
- Intl:
. Partially fixed #72506 (idn_to_ascii for UTS #46 incorrect for long domain
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #73337 (try/catch not working with two exceptions inside a same operation)
--FILE--
<?php
class d { function __destruct() { throw new Exception; } }
try { new d + new d; } catch (Exception $e) { print "Exception properly caught\n"; }
?>
--EXPECTF--
Notice: Object of class d could not be converted to int in %sbug73337.php on line 3
Notice: Object of class d could not be converted to int in %sbug73337.php on line 3
Exception properly caught
@@ -1,7 +1,5 @@
--TEST--
Testing __debugInfo() magic method with bad returns RESOURCE
--INI--
allow_url_fopen=1
--FILE--
<?php
-1
View File
@@ -667,7 +667,6 @@ END_EXTERN_C()
} \
RETVAL_STRINGL((s), (int)__len, (dup)); \
} while (0)
#define RETURN_STRINGL_CHECK(s, len, dup) { RETVAL_STRINGL_CHECK(s, len, dup); return; }
#define SET_VAR_STRING(n, v) { \
+2 -2
View File
@@ -909,10 +909,11 @@ static void zend_error_va(int type, const char *file, uint lineno, const char *f
ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce_exception = Z_OBJCE_P(exception);
EG(exception) = NULL;
if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) {
zval *str, *file, *line;
EG(exception) = NULL;
zend_call_method_with_0_params(&exception, ce_exception, NULL, "__tostring", &str);
if (!EG(exception)) {
if (Z_TYPE_P(str) != IS_STRING) {
@@ -951,7 +952,6 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
} else {
zend_error(severity, "Uncaught exception '%s'", ce_exception->name);
}
zval_ptr_dtor(&exception);
}
/* }}} */
-3
View File
@@ -826,10 +826,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) {
*fci->retval_ptr_ptr = zend_generator_create_zval(EG(active_op_array) TSRMLS_CC);
} else {
const zend_op *current_opline_before_exception = EG(opline_before_exception);
zend_execute(EG(active_op_array) TSRMLS_CC);
EG(opline_before_exception) = current_opline_before_exception;
}
if (!fci->symbol_table && EG(active_symbol_table)) {
+1 -1
View File
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=6
PHP_RELEASE_VERSION=29
PHP_RELEASE_VERSION=27
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`
+2 -2
View File
@@ -513,7 +513,7 @@ static PHP_FUNCTION(bzcompress)
dest_len = (unsigned int) (source_len + (0.01 * source_len) + 600);
/* Allocate the destination buffer */
dest = safe_emalloc(dest_len, 1, 1);
dest = emalloc(dest_len + 1);
/* Handle the optional arguments */
if (argc > 1) {
@@ -533,7 +533,7 @@ static PHP_FUNCTION(bzcompress)
so we erealloc() the buffer to the proper size */
dest = erealloc(dest, dest_len + 1);
dest[dest_len] = 0;
RETURN_STRINGL_CHECK(dest, dest_len, 0);
RETURN_STRINGL(dest, dest_len, 0);
}
}
/* }}} */
+100 -104
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.15.3 on Fri Sep 30 20:18:29 2016 */
/* Generated by re2c 0.15.3 on Sun Jul 24 14:49:45 2016 */
#line 1 "ext/date/lib/parse_date.re"
/*
* The MIT License (MIT)
@@ -396,12 +396,8 @@ static timelib_sll timelib_meridian(char **ptr, timelib_sll h)
}
++*ptr;
if (**ptr == '.') {
++*ptr;
}
if (**ptr == 'M' || **ptr == 'm') {
++*ptr;
}
if (**ptr == '.') {
*ptr += 3;
} else {
++*ptr;
}
return retval;
@@ -824,11 +820,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
#line 950 "ext/date/lib/parse_date.re"
#line 946 "ext/date/lib/parse_date.re"
#line 832 "<stdout>"
#line 828 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -963,7 +959,7 @@ yy2:
}
}
yy3:
#line 1630 "ext/date/lib/parse_date.re"
#line 1626 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -976,7 +972,7 @@ yy3:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 980 "<stdout>"
#line 976 "<stdout>"
yy4:
yych = *++YYCURSOR;
if (yych <= 'E') {
@@ -1276,12 +1272,12 @@ yy11:
if (yych <= '/') goto yy12;
if (yych <= '9') goto yy1385;
yy12:
#line 1725 "ext/date/lib/parse_date.re"
#line 1721 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
#line 1285 "<stdout>"
#line 1281 "<stdout>"
yy13:
yych = *++YYCURSOR;
if (yych <= 'R') {
@@ -2295,22 +2291,22 @@ yy48:
if (yych <= '/') goto yy49;
if (yych <= '9') goto yy54;
yy49:
#line 1714 "ext/date/lib/parse_date.re"
#line 1710 "ext/date/lib/parse_date.re"
{
goto std;
}
#line 2303 "<stdout>"
#line 2299 "<stdout>"
yy50:
yych = *++YYCURSOR;
goto yy49;
yy51:
++YYCURSOR;
#line 1719 "ext/date/lib/parse_date.re"
#line 1715 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 2314 "<stdout>"
#line 2310 "<stdout>"
yy53:
yych = *++YYCURSOR;
goto yy12;
@@ -2677,7 +2673,7 @@ yy71:
if (yych == 'S') goto yy73;
if (yych == 's') goto yy73;
yy72:
#line 1698 "ext/date/lib/parse_date.re"
#line 1694 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2692,7 +2688,7 @@ yy72:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2696 "<stdout>"
#line 2692 "<stdout>"
yy73:
yych = *++YYCURSOR;
if (yych == 'D') goto yy74;
@@ -3360,7 +3356,7 @@ yy165:
}
}
yy166:
#line 1561 "ext/date/lib/parse_date.re"
#line 1557 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3377,7 +3373,7 @@ yy166:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
#line 3381 "<stdout>"
#line 3377 "<stdout>"
yy167:
yych = *++YYCURSOR;
if (yych <= 'K') {
@@ -3870,7 +3866,7 @@ yy192:
}
}
yy193:
#line 1620 "ext/date/lib/parse_date.re"
#line 1616 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -3879,7 +3875,7 @@ yy193:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 3883 "<stdout>"
#line 3879 "<stdout>"
yy194:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 21) YYFILL(21);
@@ -3925,7 +3921,7 @@ yy197:
}
}
yy198:
#line 1366 "ext/date/lib/parse_date.re"
#line 1362 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -3938,7 +3934,7 @@ yy198:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 3942 "<stdout>"
#line 3938 "<stdout>"
yy199:
yyaccept = 6;
yych = *(YYMARKER = ++YYCURSOR);
@@ -4183,7 +4179,7 @@ yy221:
if (yych <= ':') goto yy224;
}
yy222:
#line 1668 "ext/date/lib/parse_date.re"
#line 1664 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4212,7 +4208,7 @@ yy222:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4216 "<stdout>"
#line 4212 "<stdout>"
yy223:
yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
@@ -4854,7 +4850,7 @@ yy276:
}
yy277:
++YYCURSOR;
#line 1644 "ext/date/lib/parse_date.re"
#line 1640 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -4877,7 +4873,7 @@ yy277:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4881 "<stdout>"
#line 4877 "<stdout>"
yy279:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
@@ -5039,7 +5035,7 @@ yy292:
yy293:
++YYCURSOR;
yy294:
#line 1338 "ext/date/lib/parse_date.re"
#line 1334 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5052,7 +5048,7 @@ yy294:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 5056 "<stdout>"
#line 5052 "<stdout>"
yy295:
yych = *++YYCURSOR;
if (yych <= '/') {
@@ -6203,7 +6199,7 @@ yy361:
if ((yych = *YYCURSOR) <= '/') goto yy363;
if (yych <= '9') goto yy364;
yy363:
#line 1482 "ext/date/lib/parse_date.re"
#line 1478 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6216,7 +6212,7 @@ yy363:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 6220 "<stdout>"
#line 6216 "<stdout>"
yy364:
yych = *++YYCURSOR;
if (yych <= '/') goto yy363;
@@ -6825,7 +6821,7 @@ yy391:
if (yych <= 'z') goto yy142;
}
yy392:
#line 1540 "ext/date/lib/parse_date.re"
#line 1536 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -6845,7 +6841,7 @@ yy392:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 6849 "<stdout>"
#line 6845 "<stdout>"
yy393:
yyaccept = 5;
yych = *(YYMARKER = ++YYCURSOR);
@@ -8533,7 +8529,7 @@ yy452:
yy453:
++YYCURSOR;
yy454:
#line 1243 "ext/date/lib/parse_date.re"
#line 1239 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -8544,7 +8540,7 @@ yy454:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 8548 "<stdout>"
#line 8544 "<stdout>"
yy455:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -9080,7 +9076,7 @@ yy474:
}
}
yy475:
#line 1380 "ext/date/lib/parse_date.re"
#line 1376 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9091,7 +9087,7 @@ yy475:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 9095 "<stdout>"
#line 9091 "<stdout>"
yy476:
yyaccept = 10;
yych = *(YYMARKER = ++YYCURSOR);
@@ -9219,7 +9215,7 @@ yy485:
}
yy487:
++YYCURSOR;
#line 1098 "ext/date/lib/parse_date.re"
#line 1094 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9235,7 +9231,7 @@ yy487:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 9239 "<stdout>"
#line 9235 "<stdout>"
yy489:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
@@ -9246,7 +9242,7 @@ yy489:
if (yych <= ':') goto yy492;
}
yy490:
#line 1135 "ext/date/lib/parse_date.re"
#line 1131 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9271,7 +9267,7 @@ yy490:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9275 "<stdout>"
#line 9271 "<stdout>"
yy491:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
@@ -9548,7 +9544,7 @@ yy520:
}
yy522:
++YYCURSOR;
#line 1115 "ext/date/lib/parse_date.re"
#line 1111 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -9567,7 +9563,7 @@ yy522:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9571 "<stdout>"
#line 9567 "<stdout>"
yy524:
yyaccept = 11;
YYMARKER = ++YYCURSOR;
@@ -9662,7 +9658,7 @@ yy533:
if ((yych = *YYCURSOR) <= '/') goto yy534;
if (yych <= '9') goto yy540;
yy534:
#line 1297 "ext/date/lib/parse_date.re"
#line 1293 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -9676,7 +9672,7 @@ yy534:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 9680 "<stdout>"
#line 9676 "<stdout>"
yy535:
yych = *++YYCURSOR;
if (yych == 'M') goto yy536;
@@ -10340,7 +10336,7 @@ yy604:
if (yych <= '/') goto yy56;
if (yych >= ':') goto yy56;
++YYCURSOR;
#line 1312 "ext/date/lib/parse_date.re"
#line 1308 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -10351,7 +10347,7 @@ yy604:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 10355 "<stdout>"
#line 10351 "<stdout>"
yy607:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
@@ -10382,7 +10378,7 @@ yy610:
if (yych <= '/') goto yy611;
if (yych <= '9') goto yy604;
yy611:
#line 1324 "ext/date/lib/parse_date.re"
#line 1320 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -10395,7 +10391,7 @@ yy611:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 10399 "<stdout>"
#line 10395 "<stdout>"
yy612:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
@@ -10991,7 +10987,7 @@ yy655:
}
}
yy656:
#line 1283 "ext/date/lib/parse_date.re"
#line 1279 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11004,7 +11000,7 @@ yy656:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11008 "<stdout>"
#line 11004 "<stdout>"
yy657:
yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
@@ -11100,7 +11096,7 @@ yy665:
}
}
yy666:
#line 1227 "ext/date/lib/parse_date.re"
#line 1223 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11115,7 +11111,7 @@ yy666:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 11119 "<stdout>"
#line 11115 "<stdout>"
yy667:
yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
@@ -11314,7 +11310,7 @@ yy699:
if (yych <= '9') goto yy702;
if (yych <= ':') goto yy703;
yy700:
#line 1510 "ext/date/lib/parse_date.re"
#line 1506 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -11334,7 +11330,7 @@ yy700:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 11338 "<stdout>"
#line 11334 "<stdout>"
yy701:
yych = *++YYCURSOR;
if (yych <= '5') {
@@ -11821,7 +11817,7 @@ yy762:
if (yych <= 't') goto yy662;
}
yy763:
#line 1255 "ext/date/lib/parse_date.re"
#line 1251 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -11834,7 +11830,7 @@ yy763:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11838 "<stdout>"
#line 11834 "<stdout>"
yy764:
yych = *++YYCURSOR;
if (yych == 'C') goto yy765;
@@ -11865,7 +11861,7 @@ yy769:
if (yych >= '2') goto yy56;
yy770:
++YYCURSOR;
#line 1496 "ext/date/lib/parse_date.re"
#line 1492 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -11878,7 +11874,7 @@ yy770:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 11882 "<stdout>"
#line 11878 "<stdout>"
yy772:
yych = *++YYCURSOR;
if (yych == 'V') goto yy765;
@@ -12003,7 +11999,7 @@ yy782:
default: goto yy783;
}
yy783:
#line 1531 "ext/date/lib/parse_date.re"
#line 1527 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12011,7 +12007,7 @@ yy783:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12015 "<stdout>"
#line 12011 "<stdout>"
yy784:
yych = *++YYCURSOR;
switch (yych) {
@@ -12149,7 +12145,7 @@ yy792:
if (yych <= 'X') goto yy883;
}
yy793:
#line 1352 "ext/date/lib/parse_date.re"
#line 1348 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -12162,7 +12158,7 @@ yy793:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 12166 "<stdout>"
#line 12162 "<stdout>"
yy794:
yych = *++YYCURSOR;
if (yych == 'I') goto yy927;
@@ -12356,7 +12352,7 @@ yy813:
if (yych <= '/') goto yy814;
if (yych <= '7') goto yy816;
yy814:
#line 1463 "ext/date/lib/parse_date.re"
#line 1459 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -12374,14 +12370,14 @@ yy814:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 12378 "<stdout>"
#line 12374 "<stdout>"
yy815:
yych = *++YYCURSOR;
if (yych <= '/') goto yy56;
if (yych >= '8') goto yy56;
yy816:
++YYCURSOR;
#line 1444 "ext/date/lib/parse_date.re"
#line 1440 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -12399,7 +12395,7 @@ yy816:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 12403 "<stdout>"
#line 12399 "<stdout>"
yy818:
yych = *++YYCURSOR;
if (yych <= '/') goto yy60;
@@ -12459,7 +12455,7 @@ yy820:
}
}
yy821:
#line 1430 "ext/date/lib/parse_date.re"
#line 1426 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -12472,7 +12468,7 @@ yy821:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 12476 "<stdout>"
#line 12472 "<stdout>"
yy822:
yych = *++YYCURSOR;
if (yych <= '/') goto yy60;
@@ -12554,7 +12550,7 @@ yy840:
yy841:
++YYCURSOR;
yy842:
#line 1404 "ext/date/lib/parse_date.re"
#line 1400 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -12579,7 +12575,7 @@ yy842:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 12583 "<stdout>"
#line 12579 "<stdout>"
yy843:
yych = *++YYCURSOR;
if (yych <= '2') {
@@ -12835,7 +12831,7 @@ yy847:
}
}
yy848:
#line 1392 "ext/date/lib/parse_date.re"
#line 1388 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -12846,7 +12842,7 @@ yy848:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 12850 "<stdout>"
#line 12846 "<stdout>"
yy849:
yych = *++YYCURSOR;
if (yych <= 'H') {
@@ -13640,7 +13636,7 @@ yy972:
if (yych <= '/') goto yy973;
if (yych <= '9') goto yy995;
yy973:
#line 1269 "ext/date/lib/parse_date.re"
#line 1265 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -13653,7 +13649,7 @@ yy973:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 13657 "<stdout>"
#line 13653 "<stdout>"
yy974:
yyaccept = 22;
yych = *(YYMARKER = ++YYCURSOR);
@@ -14565,7 +14561,7 @@ yy1065:
default: goto yy1067;
}
yy1067:
#line 1161 "ext/date/lib/parse_date.re"
#line 1157 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -14587,7 +14583,7 @@ yy1067:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 14591 "<stdout>"
#line 14587 "<stdout>"
yy1068:
yych = *++YYCURSOR;
if (yych <= '/') goto yy60;
@@ -14671,7 +14667,7 @@ yy1074:
}
}
yy1075:
#line 1207 "ext/date/lib/parse_date.re"
#line 1203 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -14690,7 +14686,7 @@ yy1075:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 14694 "<stdout>"
#line 14690 "<stdout>"
yy1076:
yyaccept = 25;
yych = *(YYMARKER = ++YYCURSOR);
@@ -15546,7 +15542,7 @@ yy1116:
}
}
yy1117:
#line 1603 "ext/date/lib/parse_date.re"
#line 1599 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -15562,7 +15558,7 @@ yy1117:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 15566 "<stdout>"
#line 15562 "<stdout>"
yy1118:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@@ -15604,7 +15600,7 @@ yy1124:
if (yych != 'f') goto yy56;
yy1125:
++YYCURSOR;
#line 1076 "ext/date/lib/parse_date.re"
#line 1072 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -15625,7 +15621,7 @@ yy1125:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
#line 15629 "<stdout>"
#line 15625 "<stdout>"
yy1127:
yyaccept = 26;
yych = *(YYMARKER = ++YYCURSOR);
@@ -15718,7 +15714,7 @@ yy1140:
}
}
yy1141:
#line 1579 "ext/date/lib/parse_date.re"
#line 1575 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -15741,7 +15737,7 @@ yy1141:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 15745 "<stdout>"
#line 15741 "<stdout>"
yy1142:
yych = *++YYCURSOR;
goto yy1117;
@@ -18265,7 +18261,7 @@ yy1293:
if (yych <= '9') goto yy1296;
goto yy1297;
yy1294:
#line 1053 "ext/date/lib/parse_date.re"
#line 1049 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -18287,7 +18283,7 @@ yy1294:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 18291 "<stdout>"
#line 18287 "<stdout>"
yy1295:
yyaccept = 28;
yych = *(YYMARKER = ++YYCURSOR);
@@ -18526,7 +18522,7 @@ yy1314:
if (yych != 'f') goto yy56;
yy1315:
++YYCURSOR;
#line 1036 "ext/date/lib/parse_date.re"
#line 1032 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -18542,7 +18538,7 @@ yy1315:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 18546 "<stdout>"
#line 18542 "<stdout>"
yy1317:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -19902,7 +19898,7 @@ yy1385:
if (yych <= '/') goto yy1387;
if (yych <= '9') goto yy1385;
yy1387:
#line 1010 "ext/date/lib/parse_date.re"
#line 1006 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -19927,7 +19923,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 19931 "<stdout>"
#line 19927 "<stdout>"
yy1388:
yych = *++YYCURSOR;
if (yych <= 'N') {
@@ -20333,7 +20329,7 @@ yy1415:
yy1416:
++YYCURSOR;
yy1417:
#line 998 "ext/date/lib/parse_date.re"
#line 994 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -20344,7 +20340,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 20348 "<stdout>"
#line 20344 "<stdout>"
yy1418:
yych = *++YYCURSOR;
if (yych <= 'Y') {
@@ -20376,7 +20372,7 @@ yy1419:
if (yych <= 'z') goto yy144;
}
yy1420:
#line 988 "ext/date/lib/parse_date.re"
#line 984 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -20385,7 +20381,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 20389 "<stdout>"
#line 20385 "<stdout>"
yy1421:
yych = *++YYCURSOR;
if (yych <= 'S') {
@@ -22317,7 +22313,7 @@ yy1499:
if (yych <= 'z') goto yy142;
}
yy1500:
#line 967 "ext/date/lib/parse_date.re"
#line 963 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -22325,7 +22321,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22329 "<stdout>"
#line 22325 "<stdout>"
yy1501:
yych = *++YYCURSOR;
if (yych <= 'N') {
@@ -22456,7 +22452,7 @@ yy1507:
if (yych <= 'z') goto yy143;
}
yy1508:
#line 976 "ext/date/lib/parse_date.re"
#line 972 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -22467,7 +22463,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22471 "<stdout>"
#line 22467 "<stdout>"
yy1509:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -22977,7 +22973,7 @@ yy1529:
yy1530:
++YYCURSOR;
yy1531:
#line 955 "ext/date/lib/parse_date.re"
#line 951 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -22988,7 +22984,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22992 "<stdout>"
#line 22988 "<stdout>"
yy1532:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -23153,7 +23149,7 @@ yy1537:
goto yy1531;
}
}
#line 1729 "ext/date/lib/parse_date.re"
#line 1725 "ext/date/lib/parse_date.re"
}
+2 -6
View File
@@ -394,12 +394,8 @@ static timelib_sll timelib_meridian(char **ptr, timelib_sll h)
}
++*ptr;
if (**ptr == '.') {
++*ptr;
}
if (**ptr == 'M' || **ptr == 'm') {
++*ptr;
}
if (**ptr == '.') {
*ptr += 3;
} else {
++*ptr;
}
return retval;
+2783 -2818
View File
File diff suppressed because it is too large. Load diff
+6 -6
View File
@@ -75,8 +75,8 @@ result = Monday 1983-04-18 01:00:00 CEST
wanted = Monday 00:00:00
Asia/Yerevan
ts = Monday 2037-10-19 17:17:17 +04
result = Monday 2037-10-26 00:00:00 +04
ts = Monday 2037-10-19 17:17:17 AMT
result = Monday 2037-10-26 00:00:00 AMT
wanted = Monday 00:00:00
America/Curacao
@@ -115,8 +115,8 @@ result = Monday 1971-04-05 00:00:00 AST
wanted = Monday 00:00:00
Asia/Baku
ts = Friday 1971-01-01 17:17:17 +04
result = Monday 1971-01-04 00:00:00 +04
ts = Friday 1971-01-01 17:17:17 BAKT
result = Monday 1971-01-04 00:00:00 BAKT
wanted = Monday 00:00:00
Europe/Sarajevo
@@ -165,6 +165,6 @@ result = Monday 1980-04-07 00:00:00 CEST
wanted = Monday 00:00:00
Asia/Baku
ts = Monday 1995-12-25 17:17:17 +04
result = Monday 1996-01-01 00:00:00 +04
ts = Monday 1995-12-25 17:17:17 AZT
result = Monday 1996-01-01 00:00:00 AZT
wanted = Monday 00:00:00
+2 -2
View File
@@ -226,8 +226,8 @@ result=Thursday 1980-04-10 00:00:00 CEST 1
wanted=Thursday 00:00:00
TZ=Asia/Baku - wrong day.
tStamp=Sunday 1992-09-20 17:17:17 +04 1
result=Monday 1992-09-28 00:00:00 +04 0
tStamp=Sunday 1992-09-20 17:17:17 AZST 1
result=Monday 1992-09-28 00:00:00 AZT 0
wanted=Monday 00:00:00
TZ=America/Noronha - wrong day.
+2 -2
View File
@@ -28,6 +28,6 @@ result=Monday 1990-10-22 00:00:00 WART 0
wanted=Monday 00:00:00
TZ=Asia/Tbilisi - Is it OK for this to be 2 AM?
tStamp=Sunday 2005-03-20 17:17:17 +03 0
result=Sunday 2005-03-27 00:00:00 +03 0
tStamp=Sunday 2005-03-20 17:17:17 GET 0
result=Sunday 2005-03-27 00:00:00 GET 0
wanted=Sunday 00:00:00
+1 -4
View File
@@ -5175,7 +5175,7 @@ PHP_FUNCTION(imagescale)
gdImagePtr im_scaled = NULL;
int new_width, new_height;
long tmp_w, tmp_h=-1, tmp_m = GD_BILINEAR_FIXED;
gdInterpolationMethod method, old_method;
gdInterpolationMethod method;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &tmp_w, &tmp_h, &tmp_m) == FAILURE) {
return;
@@ -5202,12 +5202,9 @@ PHP_FUNCTION(imagescale)
new_width = tmp_w;
new_height = tmp_h;
/* gdImageGetInterpolationMethod() is only available as of GD 2.1.1 */
old_method = im->interpolation_id;
if (gdImageSetInterpolationMethod(im, method)) {
im_scaled = gdImageScale(im, new_width, new_height);
}
gdImageSetInterpolationMethod(im, old_method);
if (im_scaled == NULL) {
RETURN_FALSE;
+66 -33
View File
@@ -1117,7 +1117,7 @@ void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
}
/* 2.0.10: Nick Atty: clip to edges of drawing rectangle, return if no points need to be drawn */
if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) {
if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im))) {
return;
}
@@ -1298,13 +1298,58 @@ inline static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color
void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
{
/* keep them as 32bits */
long x, y, inc, frac;
long x, y, inc;
long dx, dy,tmp;
/* 2.0.10: Nick Atty: clip to edges of drawing rectangle, return if no points need to be drawn */
if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) {
if (y1 < 0 && y2 < 0) {
return;
}
if (y1 < 0) {
x1 += (y1 * (x1 - x2)) / (y2 - y1);
y1 = 0;
}
if (y2 < 0) {
x2 += (y2 * (x1 - x2)) / (y2 - y1);
y2 = 0;
}
/* bottom edge */
if (y1 >= im->sy && y2 >= im->sy) {
return;
}
if (y1 >= im->sy) {
x1 -= ((im->sy - y1) * (x1 - x2)) / (y2 - y1);
y1 = im->sy - 1;
}
if (y2 >= im->sy) {
x2 -= ((im->sy - y2) * (x1 - x2)) / (y2 - y1);
y2 = im->sy - 1;
}
/* left edge */
if (x1 < 0 && x2 < 0) {
return;
}
if (x1 < 0) {
y1 += (x1 * (y1 - y2)) / (x2 - x1);
x1 = 0;
}
if (x2 < 0) {
y2 += (x2 * (y1 - y2)) / (x2 - x1);
x2 = 0;
}
/* right edge */
if (x1 >= im->sx && x2 >= im->sx) {
return;
}
if (x1 >= im->sx) {
y1 -= ((im->sx - x1) * (y1 - y2)) / (x2 - x1);
x1 = im->sx - 1;
}
if (x2 >= im->sx) {
y2 -= ((im->sx - x2) * (y1 - y2)) / (x2 - x1);
x2 = im->sx - 1;
}
dx = x2 - x1;
dy = y2 - y1;
@@ -1323,22 +1368,16 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
dx = x2 - x1;
dy = y2 - y1;
}
y = y1;
x = x1 << 16;
y = y1 << 16;
inc = (dy * 65536) / dx;
frac = 0;
for (x = x1; x <= x2; x++) {
gdImageSetAAPixelColor(im, x, y, col, (frac >> 8) & 0xFF);
if (y + 1 < im->sy) {
gdImageSetAAPixelColor(im, x, y + 1, col, (~frac >> 8) & 0xFF);
}
frac += inc;
if (frac >= 65536) {
frac -= 65536;
y++;
} else if (frac < 0) {
frac += 65536;
y--;
while ((x >> 16) <= x2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF);
if ((y >> 16) + 1 < im->sy) {
gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF);
}
x += (1 << 16);
y += inc;
}
} else {
if (dy < 0) {
@@ -1351,22 +1390,16 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
dx = x2 - x1;
dy = y2 - y1;
}
x = x1;
x = x1 << 16;
y = y1 << 16;
inc = (dx * 65536) / dy;
frac = 0;
for (y = y1; y <= y2; y++) {
gdImageSetAAPixelColor(im, x, y, col, (frac >> 8) & 0xFF);
if (x + 1 < im->sx) {
gdImageSetAAPixelColor(im, x + 1, y, col, (~frac >> 8) & 0xFF);
}
frac += inc;
if (frac >= 65536) {
frac -= 65536;
x++;
} else if (frac < 0) {
frac += 65536;
x--;
while ((y>>16) <= y2) {
gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF);
if ((x >> 16) + 1 < im->sx) {
gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);
}
x += inc;
y += (1<<16);
}
}
}
@@ -1747,7 +1780,7 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
int leftLimit = -1, rightLimit;
int i, restoreAlphaBlending = 0;
if (border < 0 || color < 0) {
if (border < 0) {
/* Refuse to fill to a non-solid border */
return;
}
-4
View File
@@ -243,10 +243,6 @@ gdImagePtr gdImageCropThreshold(gdImagePtr im, const unsigned int color, const f
return NULL;
}
if (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im)) {
return NULL;
}
/* TODO: Add gdImageGetRowPtr and works with ptr at the row level
* for the true color and palette images
* new formats will simply work with ptr
+4 -4
View File
@@ -1331,10 +1331,10 @@ static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int
f_a4 = gd_itofx(gdTrueColorGetAlpha(pixel4));
{
const unsigned char red = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_r1) + gd_mulfx(f_w2, f_r2) + gd_mulfx(f_w3, f_r3) + gd_mulfx(f_w4, f_r4));
const unsigned char green = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_g1) + gd_mulfx(f_w2, f_g2) + gd_mulfx(f_w3, f_g3) + gd_mulfx(f_w4, f_g4));
const unsigned char blue = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_b1) + gd_mulfx(f_w2, f_b2) + gd_mulfx(f_w3, f_b3) + gd_mulfx(f_w4, f_b4));
const unsigned char alpha = (unsigned char) gd_fxtoi(gd_mulfx(f_w1, f_a1) + gd_mulfx(f_w2, f_a2) + gd_mulfx(f_w3, f_a3) + gd_mulfx(f_w4, f_a4));
const char red = (char) gd_fxtoi(gd_mulfx(f_w1, f_r1) + gd_mulfx(f_w2, f_r2) + gd_mulfx(f_w3, f_r3) + gd_mulfx(f_w4, f_r4));
const char green = (char) gd_fxtoi(gd_mulfx(f_w1, f_g1) + gd_mulfx(f_w2, f_g2) + gd_mulfx(f_w3, f_g3) + gd_mulfx(f_w4, f_g4));
const char blue = (char) gd_fxtoi(gd_mulfx(f_w1, f_b1) + gd_mulfx(f_w2, f_b2) + gd_mulfx(f_w3, f_b3) + gd_mulfx(f_w4, f_b4));
const char alpha = (char) gd_fxtoi(gd_mulfx(f_w1, f_a1) + gd_mulfx(f_w2, f_a2) + gd_mulfx(f_w3, f_a3) + gd_mulfx(f_w4, f_a4));
new_img->tpixels[dst_offset_v][dst_offset_h] = gdTrueColorAlpha(red, green, blue, alpha);
}
+1 -1
View File
@@ -237,7 +237,7 @@ static int dynamicGetbuf (gdIOCtxPtr ctx, void *buf, int len)
if (remain >= len) {
rlen = len;
} else {
if (remain <= 0) {
if (remain == 0) {
return EOF;
}
rlen = remain;
-19
View File
@@ -1,19 +0,0 @@
--TEST--
Bug #72482 (Ilegal write/read access caused by gdImageAALine overflow)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$img = imagecreatetruecolor(13, 1007);
imageantialias($img, true);
imageline($img, 0, 0, 1073745919, 1073745919, 4096);
$img = imagecreatetruecolor(100, 100);
imageantialias($img, true);
imageline($img, 1094795585, 0, 2147483647, 255, 0xff);
?>
===DONE===
--EXPECT--
===DONE===
-21
View File
@@ -1,21 +0,0 @@
--TEST--
Bug 72482 (Ilegal write/read access caused by gdImageAALine overflow)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
$im = imagecreatetruecolor(10, 10);
imagefilledrectangle($im, 0, 0, 9, 9, imagecolorallocate($im, 255, 255, 255));
imageantialias($im, true);
imageline($im, 0, 0, 10, 10, imagecolorallocate($im, 0, 0, 0));
test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug72482_2.png', $im);
?>
===DONE===
--EXPECT--
The images are equal.
===DONE===
Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #72494 (imagecropauto out-of-bounds access)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreate(10,10);
imagecropauto($im, IMG_CROP_THRESHOLD, 0, 1337);
?>
===DONE===
--EXPECTF--
Warning: imagecropauto(): Color argument missing with threshold mode in %s on line %d
===DONE===
-14
View File
@@ -1,14 +0,0 @@
--TEST--
Bug #72696 (imagefilltoborder stackoverflow on truecolor images)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagecreatetruecolor(10, 10);
imagefilltoborder($im, 0, 0, 1, -2);
?>
===DONE===
--EXPECT--
===DONE===
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #73213 (Integer overflow in imageline() with antialiasing)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
$im = imagecreatetruecolor(32768, 1);
$black = imagecolorallocate($im, 0, 0, 0);
imageantialias($im, true);
imageline($im, 0,0, 32767,0, $black);
test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug73213.png', $im);
?>
===DONE===
--EXPECT--
The images are equal.
===DONE===
Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #73272 (imagescale() is not affected by, but affects imagesetinterpolation())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'func.inc';
$src = imagecreatetruecolor(100, 100);
imagefilledrectangle($src, 0,0, 99,99, 0xFFFFFF);
imageellipse($src, 49,49, 40,40, 0x000000);
imagesetinterpolation($src, IMG_NEAREST_NEIGHBOUR);
imagescale($src, 200, 200, IMG_BILINEAR_FIXED);
$dst = imagerotate($src, 60, 0xFFFFFF);
test_image_equals_file(__DIR__ . DIRECTORY_SEPARATOR . 'bug73272.png', $dst);
?>
===DONE===
--EXPECT--
The images are equal.
===DONE===
Binary file not shown.

Before

Width:  |  Height:  |  Size: 739 B

-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug #73279 (Integer overflow in gdImageScaleBilinearPalette())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.4', '<')) {
die('skip only for bundled libgd or external libgd >= 2.2.4');
}
?>
--FILE--
<?php
$src = imagecreate(100, 100);
imagecolorallocate($src, 255, 255, 255);
$dst = imagescale($src, 200, 200, IMG_BILINEAR_FIXED);
printf("color: %x\n", imagecolorat($dst, 99, 99));
?>
===DONE===
--EXPECT--
color: ffffff
===DONE===
-22
View File
@@ -1,22 +0,0 @@
--TEST--
Bug #73279 (Integer overflow in gdImageScaleBilinearPalette())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (GD_BUNDLED || version_compare(GD_VERSION, '2.2.4', '>=')) {
die('skip only for external libgd < 2.2.4');
}
?>
--FILE--
<?php
$src = imagecreate(100, 100);
imagecolorallocate($src, 255, 255, 255);
$dst = imagescale($src, 200, 200, IMG_BILINEAR_FIXED);
printf("color: %x\n", imagecolorat($dst, 99, 99));
?>
===DONE===
--XFAIL--
Bug #330 has not yet been fixed
--EXPECT--
color: ffffff
===DONE===
+1 -1
View File
@@ -2491,7 +2491,7 @@ PHP_NAMED_FUNCTION(php_if_iconv)
&out_buffer, &out_len, out_charset, in_charset);
_php_iconv_show_error(err, out_charset, in_charset TSRMLS_CC);
if (err == PHP_ICONV_ERR_SUCCESS && out_buffer != NULL) {
RETVAL_STRINGL_CHECK(out_buffer, out_len, 0);
RETVAL_STRINGL(out_buffer, out_len, 0);
} else {
if (out_buffer != NULL) {
efree(out_buffer);
+2 -2
View File
@@ -3900,7 +3900,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *
char *tsm_errmsg = NULL;
ADDRESS *addr;
char *bufferTo = NULL, *bufferCc = NULL, *bufferBcc = NULL, *bufferHeader = NULL;
size_t offset, bufferLen = 0;
int offset, bufferLen = 0;
size_t bt_len;
if (headers) {
@@ -3916,7 +3916,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *
#define PHP_IMAP_CLEAN if (bufferTo) efree(bufferTo); if (bufferCc) efree(bufferCc); if (bufferBcc) efree(bufferBcc); if (bufferHeader) efree(bufferHeader);
#define PHP_IMAP_BAD_DEST PHP_IMAP_CLEAN; efree(tempMailTo); return (BAD_MSG_DESTINATION);
bufferHeader = (char *)safe_emalloc(bufferLen, 1, 1);
bufferHeader = (char *)emalloc(bufferLen + 1);
memset(bufferHeader, 0, bufferLen);
if (to && *to) {
strlcat(bufferHeader, "To: ", bufferLen + 1);
@@ -182,7 +182,7 @@ static void _breakiterator_parts_move_forward(zend_object_iterator *iter TSRMLS_
}
assert(next <= slen && next >= cur);
len = next - cur;
res = static_cast<char*>(safe_emalloc(len, 1, 1));
res = static_cast<char*>(emalloc(len + 1));
memcpy(res, &s[cur], len);
res[len] = '\0';
+1 -1
View File
@@ -49,7 +49,7 @@ void intl_convert_utf8_to_utf16(
UErrorCode* status )
{
UChar* dst_buf = NULL;
uint32_t dst_len = 0;
int32_t dst_len = 0;
/* If *target is NULL determine required destination buffer size (pre-flighting).
* Otherwise, attempt to convert source string; if *target buffer is not large enough
+1 -8
View File
@@ -263,9 +263,6 @@ static char* get_icu_value_internal( const char* loc_name , char* tag_name, int*
int32_t buflen = 512;
UErrorCode status = U_ZERO_ERROR;
if (strlen(loc_name) > INTL_MAX_LOCALE_LEN) {
return NULL;
}
if( strcmp(tag_name, LOC_CANONICALIZE_TAG) != 0 ){
/* Handle grandfathered languages */
@@ -398,7 +395,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
if(loc_name_len == 0) {
loc_name = intl_locale_get_default(TSRMLS_C);
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
/* Call ICU get */
@@ -705,8 +702,6 @@ PHP_FUNCTION( locale_get_keywords )
RETURN_FALSE;
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
if(loc_name_len == 0) {
loc_name = intl_locale_get_default(TSRMLS_C);
}
@@ -1114,8 +1109,6 @@ PHP_FUNCTION(locale_parse)
RETURN_FALSE;
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
if(loc_name_len == 0) {
loc_name = intl_locale_get_default(TSRMLS_C);
}
+2 -2
View File
@@ -80,10 +80,10 @@ msgformat_data* msgformat_data_create( TSRMLS_D )
/* }}} */
#ifdef MSG_FORMAT_QUOTE_APOS
int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *ec)
int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *ec)
{
if(*spattern && *spattern_len && u_strchr(*spattern, (UChar)'\'')) {
UChar *npattern = safe_emalloc(sizeof(UChar)*2, *spattern_len, sizeof(UChar));
UChar *npattern = emalloc(sizeof(UChar)*(2*(*spattern_len)+1));
uint32_t npattern_len;
npattern_len = umsg_autoQuoteApostrophe(*spattern, *spattern_len, npattern, 2*(*spattern_len)+1, ec);
efree(*spattern);
-1
View File
@@ -1310,7 +1310,6 @@ static void php_mcrypt_do_crypt(char* cipher, const char *key, int key_len, cons
}
if (mcrypt_generic_init(td, (void *) key, key_len, (void *) iv) < 0) {
efree(data_s);
php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Mcrypt initialisation failed");
mcrypt_module_close(td);
RETURN_FALSE;
+3 -3
View File
@@ -157,7 +157,7 @@ static void update_op1_const(zend_op_array *op_array,
opline->op1.constant = zend_optimizer_add_literal(op_array, val TSRMLS_CC);
Z_HASH_P(&ZEND_OP1_LITERAL(opline)) = zend_hash_func(Z_STRVAL(ZEND_OP1_LITERAL(opline)), Z_STRLEN(ZEND_OP1_LITERAL(opline)) + 1);
op_array->literals[opline->op1.constant].cache_slot = op_array->last_cache_slot++;
Z_STRVAL_P(val) = zend_str_tolower_dup(Z_STRVAL_P(val), Z_STRLEN_P(val));
zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
zend_optimizer_add_literal(op_array, val TSRMLS_CC);
op_array->literals[opline->op1.constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op1.constant+1].constant), Z_STRLEN(op_array->literals[opline->op1.constant+1].constant) + 1);
break;
@@ -205,13 +205,13 @@ static void update_op2_const(zend_op_array *op_array,
case ZEND_ADD_INTERFACE:
case ZEND_ADD_TRAIT:
op_array->literals[opline->op2.constant].cache_slot = op_array->last_cache_slot++;
Z_STRVAL_P(val) = zend_str_tolower_dup(Z_STRVAL_P(val), Z_STRLEN_P(val));
zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
zend_optimizer_add_literal(op_array, val TSRMLS_CC);
op_array->literals[opline->op2.constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op2.constant+1].constant), Z_STRLEN(op_array->literals[opline->op2.constant+1].constant) + 1);
break;
case ZEND_INIT_METHOD_CALL:
case ZEND_INIT_STATIC_METHOD_CALL:
Z_STRVAL_P(val) = zend_str_tolower_dup(Z_STRVAL_P(val), Z_STRLEN_P(val));
zend_str_tolower(Z_STRVAL_P(val), Z_STRLEN_P(val));
zend_optimizer_add_literal(op_array, val TSRMLS_CC);
op_array->literals[opline->op2.constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op2.constant+1].constant), Z_STRLEN(op_array->literals[opline->op2.constant+1].constant) + 1);
/* break missing intentionally */
-10
View File
@@ -102,16 +102,6 @@ opcache.validate_timestamps (default "1")
The frequency of the check is controlled by the directive
"opcache.revalidate_freq".
opcache.validate_permission (default "0")
Leads OPcache to check file readability on each access to cached file.
This directive should be enabled in shared hosting environment, when few
users (PHP-FPM pools) reuse the common OPcache shared memory.
opcache.validate_root (default "0")
This directive prevents file name collisions in different "chroot"
environments. It should be enabled for sites that may serve requests in
different "chroot" environments.
opcache.revalidate_freq (default "2")
How often (in seconds) to check file timestamps for changes to the shared
memory storage allocation. ("1" means validate once per second, but only
-43
View File
@@ -1592,28 +1592,6 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type T
persistent_script = NULL;
}
/* Revalidate acessibility of cached file */
if (EXPECTED(persistent_script != NULL) &&
UNEXPECTED(ZCG(accel_directives).validate_permission) &&
file_handle->type == ZEND_HANDLE_FILENAME &&
UNEXPECTED(access(persistent_script->full_path, R_OK) != 0)) {
if (type == ZEND_REQUIRE) {
#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename);
#else
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename TSRMLS_CC);
#endif
zend_bailout();
} else {
#if ZEND_EXTENSION_API_NO < PHP_5_3_X_API_NO
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename);
#else
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename TSRMLS_CC);
#endif
}
return NULL;
}
SHM_UNPROTECT();
/* If script is found then validate_timestamps if option is enabled */
@@ -2148,27 +2126,6 @@ static void accel_activate(void)
return;
}
#ifndef ZEND_WIN32
if (ZCG(accel_directives).validate_root) {
struct stat buf;
if (stat("/", &buf) != 0) {
ZCG(root_hash) = 0;
} else {
ZCG(root_hash) = buf.st_ino;
if (sizeof(buf.st_ino) > sizeof(ZCG(root_hash))) {
if (ZCG(root_hash) != buf.st_ino) {
zend_alter_ini_entry("opcache.enable", sizeof("opcache.enable"), "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with too big inode");
return;
}
}
}
} else {
ZCG(root_hash) = 0;
}
#endif
SHM_UNPROTECT();
/* PHP-5.4 and above return "double", but we use 1 sec precision */
ZCG(request_time) = (time_t)sapi_get_request_time(TSRMLS_C);
-7
View File
@@ -230,10 +230,6 @@ typedef struct _zend_accel_directives {
zend_bool file_override_enabled;
zend_bool inherited_hack;
zend_bool enable_cli;
zend_bool validate_permission;
#ifndef ZEND_WIN32
zend_bool validate_root;
#endif
unsigned long revalidate_freq;
unsigned long file_update_protection;
char *error_log;
@@ -268,9 +264,6 @@ typedef struct _zend_accel_globals {
int include_path_len; /* "include_path" string length */
int include_path_check;
time_t request_time;
#ifndef ZEND_WIN32
unsigned long root_hash;
#endif
/* preallocated shared-memory block to save current script */
void *mem;
/* cache to save hash lookup on the same INCLUDE opcode */
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #73402 (Opcache segfault when using class constant to call a method)
--INI--
opcache.enable=1
opcache.enable_cli=1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class Logger {
public function info($msg) {
echo $msg;
}
}
class B
{
const LOG_LEVEL = 'Info';
public function test()
{
$logger = new \Logger();
$logger->{self::LOG_LEVEL}('test');
}
}
$b = new B;
$b->test();
--EXPECT--
test
-24
View File
@@ -77,9 +77,6 @@ zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, char
zend_ulong index;
zend_accel_hash_entry *entry;
zend_accel_hash_entry *indirect_bucket = NULL;
#ifndef ZEND_WIN32
TSRMLS_FETCH();
#endif
if (indirect) {
indirect_bucket = (zend_accel_hash_entry*)data;
@@ -89,9 +86,6 @@ zend_accel_hash_entry* zend_accel_hash_update(zend_accel_hash *accel_hash, char
}
hash_value = zend_inline_hash_func(key, key_length);
#ifndef ZEND_WIN32
hash_value ^= ZCG(root_hash);
#endif
index = hash_value % accel_hash->max_num_entries;
/* try to see if the element already exists in the hash */
@@ -151,14 +145,8 @@ void* zend_accel_hash_find(zend_accel_hash *accel_hash, char *key, zend_uint key
zend_ulong hash_value;
zend_ulong index;
zend_accel_hash_entry *entry;
#ifndef ZEND_WIN32
TSRMLS_FETCH();
#endif
hash_value = zend_inline_hash_func(key, key_length);
#ifndef ZEND_WIN32
hash_value ^= ZCG(root_hash);
#endif
index = hash_value % accel_hash->max_num_entries;
entry = accel_hash->hash_table[index];
@@ -185,14 +173,8 @@ zend_accel_hash_entry* zend_accel_hash_find_entry(zend_accel_hash *accel_hash, c
zend_ulong hash_value;
zend_ulong index;
zend_accel_hash_entry *entry;
#ifndef ZEND_WIN32
TSRMLS_FETCH();
#endif
hash_value = zend_inline_hash_func(key, key_length);
#ifndef ZEND_WIN32
hash_value ^= ZCG(root_hash);
#endif
index = hash_value % accel_hash->max_num_entries;
entry = accel_hash->hash_table[index];
@@ -216,14 +198,8 @@ int zend_accel_hash_unlink(zend_accel_hash *accel_hash, char *key, zend_uint key
zend_ulong hash_value;
zend_ulong index;
zend_accel_hash_entry *entry, *last_entry=NULL;
#ifndef ZEND_WIN32
TSRMLS_FETCH();
#endif
hash_value = zend_inline_hash_func(key, key_length);
#ifndef ZEND_WIN32
hash_value ^= ZCG(root_hash);
#endif
index = hash_value % accel_hash->max_num_entries;
entry = accel_hash->hash_table[index];
-8
View File
@@ -255,10 +255,6 @@ ZEND_INI_BEGIN()
STD_PHP_INI_BOOLEAN("opcache.enable" , "1", PHP_INI_ALL, OnEnable, enabled , zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.use_cwd" , "1", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.use_cwd , zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.validate_timestamps", "1", PHP_INI_ALL , OnUpdateBool, accel_directives.validate_timestamps, zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.validate_permission", "0", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.validate_permission, zend_accel_globals, accel_globals)
#ifndef ZEND_WIN32
STD_PHP_INI_BOOLEAN("opcache.validate_root" , "0", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.validate_root , zend_accel_globals, accel_globals)
#endif
STD_PHP_INI_BOOLEAN("opcache.inherited_hack" , "1", PHP_INI_SYSTEM, OnUpdateBool, accel_directives.inherited_hack , zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.dups_fix" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.ignore_dups , zend_accel_globals, accel_globals)
STD_PHP_INI_BOOLEAN("opcache.revalidate_path" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.revalidate_path , zend_accel_globals, accel_globals)
@@ -667,10 +663,6 @@ static ZEND_FUNCTION(opcache_get_configuration)
add_assoc_bool(directives, "opcache.enable_cli", ZCG(accel_directives).enable_cli);
add_assoc_bool(directives, "opcache.use_cwd", ZCG(accel_directives).use_cwd);
add_assoc_bool(directives, "opcache.validate_timestamps", ZCG(accel_directives).validate_timestamps);
add_assoc_bool(directives, "opcache.validate_permission", ZCG(accel_directives).validate_permission);
#ifndef ZEND_WIN32
add_assoc_bool(directives, "opcache.validate_root", ZCG(accel_directives).validate_root);
#endif
add_assoc_bool(directives, "opcache.inherited_hack", ZCG(accel_directives).inherited_hack);
add_assoc_bool(directives, "opcache.dups_fix", ZCG(accel_directives).ignore_dups);
add_assoc_bool(directives, "opcache.revalidate_path", ZCG(accel_directives).revalidate_path);
+1 -1
View File
@@ -4059,7 +4059,7 @@ PHP_FUNCTION(openssl_pbkdf2)
return;
}
if (key_length <= 0 || key_length > INT_MAX) {
if (key_length <= 0) {
RETURN_FALSE;
}
-1
View File
@@ -2338,7 +2338,6 @@ void pdo_stmt_init(TSRMLS_D)
pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */
pdo_row_ce->create_object = pdo_row_new;
pdo_row_ce->serialize = pdo_row_serialize;
pdo_row_ce->unserialize = zend_class_unserialize_deny;
}
static void free_statement(pdo_stmt_t *stmt TSRMLS_DC)
+2 -2
View File
@@ -4054,7 +4054,7 @@ PHP_FUNCTION(pg_copy_to)
free_pg_null = 1;
}
spprintf(&query, 0, "COPY %s TO STDOUT DELIMITER E'%c' NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
while ((pgsql_result = PQgetResult(pgsql))) {
PQclear(pgsql_result);
@@ -4187,7 +4187,7 @@ PHP_FUNCTION(pg_copy_from)
pg_null_as_free = 1;
}
spprintf(&query, 0, "COPY %s FROM STDIN DELIMITER E'%c' NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
spprintf(&query, 0, "COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
while ((pgsql_result = PQgetResult(pgsql))) {
PQclear(pgsql_result);
}
-3
View File
@@ -29,9 +29,6 @@ else {
echo pg_last_error()."\n";
}
// Create view here
pg_query($db,$view_def);
pg_close($db);
echo "OK";
-20
View File
@@ -1,20 +0,0 @@
--TEST--
Bug 73498 Incorrect DELIMITER syntax for pg_copy_to()
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
include('config.inc');
$db = pg_connect($conn_str);
$rows = pg_copy_to($db, "(select * from {$view_name})");
var_dump(gettype($rows));
var_dump(count($rows) > 0);
?>
--EXPECT--
string(5) "array"
bool(true)
-1
View File
@@ -9,7 +9,6 @@ PostgreSQL drop db
include('config.inc');
$db = pg_connect($conn_str);
pg_query($db, "DROP VIEW {$view_name}");
pg_query($db, "DROP TABLE ".$table_name);
@pg_query($db, "DROP TABLE ".$table_name_92);
-4
View File
@@ -11,10 +11,6 @@ $table_name = "php_pgsql_test"; // test table that will be created
$table_name_92 = "php_pgsql_test_92"; // test table that will be created
$num_test_record = 1000; // Number of records to create
// Test view
$view_name = "php_pgsql_viewtest";
$view_def = "CREATE VIEW {$view_name} AS SELECT * FROM {$table_name};";
// Test table
$table_def = "CREATE TABLE ${table_name} (num int, str text, bin bytea);";
$table_def_92 = "CREATE TABLE ${table_name_92} (textary text[], jsn json);";
+5 -26
View File
@@ -904,7 +904,6 @@ PHP_METHOD(SoapFault, SoapFault)
PHP_METHOD(SoapFault, __toString)
{
zval *faultcode, *faultstring, *file, *line, *trace;
zval *faultcode_cp, *faultstring_cp, *file_cp, *line_cp;
char *str;
int len;
zend_fcall_info fci;
@@ -933,36 +932,16 @@ PHP_METHOD(SoapFault, __toString)
zend_call_function(&fci, NULL TSRMLS_CC);
ALLOC_ZVAL(faultcode_cp);
INIT_PZVAL_COPY(faultcode_cp, faultcode);
zval_copy_ctor(faultcode_cp);
ALLOC_ZVAL(faultstring_cp);
INIT_PZVAL_COPY(faultstring_cp, faultstring);
zval_copy_ctor(faultstring_cp);
ALLOC_ZVAL(file_cp);
INIT_PZVAL_COPY(file_cp, file);
zval_copy_ctor(file_cp);
ALLOC_ZVAL(line_cp);
INIT_PZVAL_COPY(line_cp, line);
zval_copy_ctor(line_cp);
convert_to_string(faultcode_cp);
convert_to_string(faultstring_cp);
convert_to_string(file_cp);
convert_to_long(line_cp);
convert_to_string(faultcode);
convert_to_string(faultstring);
convert_to_string(file);
convert_to_long(line);
convert_to_string(trace);
len = spprintf(&str, 0, "SoapFault exception: [%s] %s in %s:%ld\nStack trace:\n%s",
Z_STRVAL_P(faultcode_cp), Z_STRVAL_P(faultstring_cp), Z_STRVAL_P(file_cp), Z_LVAL_P(line_cp),
Z_STRVAL_P(faultcode), Z_STRVAL_P(faultstring), Z_STRVAL_P(file), Z_LVAL_P(line),
Z_STRLEN_P(trace) ? Z_STRVAL_P(trace) : "#0 {main}\n");
zval_ptr_dtor(&faultcode_cp);
zval_ptr_dtor(&faultstring_cp);
zval_ptr_dtor(&file_cp);
zval_ptr_dtor(&line_cp);
zval_ptr_dtor(&trace);
RETURN_STRINGL(str, len, 0);
-180
View File
@@ -1,180 +0,0 @@
--TEST--
Bug #73037 SoapServer reports Bad Request when gzipped, var 0
--SKIPIF--
<?php
require_once('skipif.inc');
if (!extension_loaded("zlib")) {
echo "skip zlib is required for this test";
}
if (!file_exists(dirname(__FILE__) . "/../../../sapi/cli/tests/php_cli_server.inc")) {
echo "skip sapi/cli/tests/php_cli_server.inc required but not found";
}
?>
--FILE--
<?php
include dirname(__FILE__) . "/../../../sapi/cli/tests/php_cli_server.inc";
function get_data($max)
{
$piece = "<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>";
$begin = '<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><CATALOG>';
$end = '</CATALOG></soapenv:Body></soapenv:Envelope>';
$min = strlen($begin) + strlen($piece) + strlen($end);
$max = $max < $min ? $min : $max;
$data = $begin;
$data .= $piece;
while (strlen($data) + strlen($end) < $max) {
/* Randomize a bit, taking gzip in account. */
$tmp = str_replace(
array(
"Empire Burlesque",
"Bob Dylan",
),
array(
md5(uniqid()),
sha1(uniqid()),
),
$piece
);
if (strlen($begin) + strlen($tmp) + strlen($end) > $max) {
break;
}
$data .= $tmp;
}
$data .= $end;
return $data;
}
$router = "bug73037_server.php";
$args = substr(PHP_OS, 0, 3) == 'WIN' ? "-d extension_dir=" . ini_get("extension_dir") . " -d extension=php_soap.dll" : "";
$code = <<<'PHP'
$s = new SoapServer(NULL, array('uri' => 'http://here'));
$s->setObject(new stdclass());
$s->handle();
PHP;
php_cli_server_start($code, $router, $args);
foreach (array(1024-1, 1024*8-3, 1024*9+1, 1024*16-1, 1024*32-5, 1024*64+3, 1024*128-7) as $k => $i) {
echo "Iteration $k\n\n";
/* with and without compression */
foreach (array(false, true) as $b) {
$data = get_data($i);
if ($b) {
$data = gzencode($data);
}
$len = strlen($data);
//echo "len=$len\n";
$hdrs = <<<HDRS
POST /bug73037_server.php HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
SOAPAction: "urn:adressen#adressen#SetAda"
Expect: 100-continue
Content-Length: ${len}
HDRS;
if ($b) {
$hdrs .="\nContent-Encoding: gzip";
}
//echo "Headers sent:\n$hdrs\n\n";
$fp = fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT, $errno, $errstr, 5);
if (!$fp) {
die("connect failed");
}
if(fwrite($fp, "$hdrs\n\n$data")) {
$out = "";
while (!feof($fp)) {
$out .= fread($fp, 1024);
}
$pos = strpos($out, "<env:Text>");
if (false === $pos) {
echo $out;
goto cleanup;
}
$pos0 = $pos + strlen("<env:Text>");
$pos = strpos($out, "</env:Text>");
if (false === $pos) {
echo $out;
goto cleanup;
}
$len = $pos - $pos0;
echo substr($out, $pos0, $len);
}
cleanup:
fclose($fp);
echo "\n\n";
}
}
?>
==DONE==
--CLEAN--
<?php
unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73037_server.php");
?>
--EXPECT--
Iteration 0
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
Iteration 1
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
Iteration 2
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
Iteration 3
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
Iteration 4
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
Iteration 5
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
Iteration 6
Function 'CATALOG' doesn't exist
Function 'CATALOG' doesn't exist
==DONE==
-17
View File
@@ -1,17 +0,0 @@
--TEST--
Bug #73452 Segfault (Regression for #69152)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$data = 'O:9:"SoapFault":4:{s:9:"faultcode";i:4298448493;s:11:"faultstring";i:4298448543;s:7:"'."\0*\0".'file";i:4298447319;s:7:"'."\0*\0".'line";s:4:"ryat";}';
echo unserialize($data);
?>
==DONE==
--EXPECTF--
SoapFault exception: [4298448493] 4298448543 in :0
Stack trace:
#0 %sbug73452.php(4): unserialize('O:9:"SoapFault"...')
#1 {main}==DONE==
+1 -1
View File
@@ -1812,7 +1812,7 @@ SPL_METHOD(Array, unserialize)
ALLOC_INIT_ZVAL(intern->array);
if (!php_var_unserialize(&intern->array, &p, s + buf_len, &var_hash TSRMLS_CC)
|| (Z_TYPE_P(intern->array) != IS_ARRAY && Z_TYPE_P(intern->array) != IS_OBJECT)) {
// zval_ptr_dtor(&intern->array);
zval_ptr_dtor(&intern->array);
goto outexcept;
}
var_push_dtor(&var_hash, &intern->array);
+6 -9
View File
@@ -591,21 +591,14 @@ PHP_METHOD(sqlite3, query)
static zval* sqlite_value_to_zval(sqlite3_stmt *stmt, int column) /* {{{ */
{
zval *data;
sqlite3_int64 val;
MAKE_STD_ZVAL(data);
switch (sqlite3_column_type(stmt, column)) {
case SQLITE_INTEGER:
val = sqlite3_column_int64(stmt, column);
#if LONG_MAX <= 2147483647
if (val > LONG_MAX || val < LONG_MIN) {
if ((sqlite3_column_int64(stmt, column)) >= INT_MAX || sqlite3_column_int64(stmt, column) <= INT_MIN) {
ZVAL_STRINGL(data, (char *)sqlite3_column_text(stmt, column), sqlite3_column_bytes(stmt, column), 1);
} else {
#endif
ZVAL_LONG(data, val);
#if LONG_MAX <= 2147483647
ZVAL_LONG(data, sqlite3_column_int64(stmt, column));
}
#endif
break;
case SQLITE_FLOAT:
@@ -2184,6 +2177,10 @@ static void php_sqlite3_result_object_free_storage(void *object TSRMLS_DC) /* {{
}
if (intern->stmt_obj_zval) {
if (intern->stmt_obj->initialised) {
sqlite3_reset(intern->stmt_obj->stmt);
}
if (intern->is_prepared_statement == 0) {
zval_dtor(intern->stmt_obj_zval);
FREE_ZVAL(intern->stmt_obj_zval);
+1 -1
View File
@@ -24,4 +24,4 @@ var_dump($num,$result[0]);
?>
--EXPECT--
int(2147483647)
int(2147483647)
string(10) "2147483647"
+1 -1
View File
@@ -24,4 +24,4 @@ var_dump($num,$result[0]);
?>
--EXPECT--
int(100004313234244)
int(100004313234244)
string(15) "100004313234244"
-26
View File
@@ -1,26 +0,0 @@
--TEST--
Bug #73333 (2147483647 is fetched as string)
--SKIPIF--
<?php
if (!extension_loaded('sqlite3')) die('skip sqlite3 extension not available');
?>
--FILE--
<?php
if (!defined('PHP_INT_MIN')) define('PHP_INT_MIN', -PHP_INT_MAX-1);
$db = new SQLite3(':memory:');
$db->exec('CREATE TABLE foo (bar INT)');
foreach ([PHP_INT_MIN, PHP_INT_MAX] as $value) {
$db->exec("INSERT INTO foo VALUES ($value)");
}
$res = $db->query('SELECT bar FROM foo');
while (($row = $res->fetchArray(SQLITE3_NUM)) !== false) {
echo gettype($row[0]), PHP_EOL;
}
?>
===DONE===
--EXPECT--
integer
integer
===DONE===
-32
View File
@@ -1,32 +0,0 @@
--TEST--
Bug #73530 (Unsetting result set may reset other result set)
--SKIPIF--
<?php
if (!extension_loaded('sqlite3')) die('skip sqlite3 extension not available');
?>
--FILE--
<?php
$db = new SQLite3(':memory:');
$db->exec("CREATE TABLE foo (num int)");
$db->exec("INSERT INTO foo VALUES (0)");
$db->exec("INSERT INTO foo VALUES (1)");
$stmt = $db->prepare("SELECT * FROM foo WHERE NUM = ?");
$stmt->bindValue(1, 0, SQLITE3_INTEGER);
$res1 = $stmt->execute();
$res1->finalize();
$stmt->clear();
$stmt->reset();
$stmt->bindValue(1, 1, SQLITE3_INTEGER);
$res2 = $stmt->execute();
while ($row = $res2->fetchArray(SQLITE3_ASSOC)) {
var_dump($row);
unset($res1);
}
?>
===DONE===
--EXPECT--
array(1) {
["num"]=>
int(1)
}
===DONE===
+7 -7
View File
@@ -133,7 +133,7 @@ PHPAPI int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_
if (type != 3) {
b = buf;
while (php_stream_get_line(stream, b, EXEC_INPUT_BUF, &bufl)) {
/* no new line found, let's read some more */
if (b[bufl - 1] != '\n' && !php_stream_eof(stream)) {
@@ -330,7 +330,7 @@ PHPAPI char *php_escape_shell_cmd(char *str)
cmd[y++] = str[x];
break;
#else
/* % is Windows specific for enviromental variables, ^%PATH% will
/* % is Windows specific for enviromental variables, ^%PATH% will
output PATH while ^%PATH^% will not. escapeshellcmd will escape all % and !.
*/
case '%':
@@ -372,7 +372,7 @@ PHPAPI char *php_escape_shell_cmd(char *str)
}
cmd[y] = '\0';
if (y > cmd_max_len + 1) {
if (y - 1 > cmd_max_len) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Escaped command exceeds the allowed length of %d bytes", cmd_max_len);
efree(cmd);
return NULL;
@@ -459,7 +459,7 @@ PHPAPI char *php_escape_shell_arg(char *str)
#endif
cmd[y] = '\0';
if (y > cmd_max_len + 1) {
if (y - 1 > cmd_max_len) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Escaped argument exceeds the allowed length of %d bytes", cmd_max_len);
efree(cmd);
return NULL;
@@ -492,7 +492,7 @@ PHP_FUNCTION(escapeshellcmd)
return;
}
cmd = php_escape_shell_cmd(command);
RETVAL_STRINGL_CHECK(cmd, strlen(cmd), 0);
RETVAL_STRING(cmd, 0);
} else {
RETVAL_EMPTY_STRING();
}
@@ -517,7 +517,7 @@ PHP_FUNCTION(escapeshellarg)
return;
}
cmd = php_escape_shell_arg(argument);
RETVAL_STRINGL_CHECK(cmd, strlen(cmd), 0);
RETVAL_STRING(cmd, 0);
}
}
/* }}} */
@@ -551,7 +551,7 @@ PHP_FUNCTION(shell_exec)
php_stream_close(stream);
if (total_readbytes > 0) {
RETVAL_STRINGL_CHECK(ret, total_readbytes, 0);
RETVAL_STRINGL(ret, total_readbytes, 0);
}
}
/* }}} */
-18
View File
@@ -699,24 +699,6 @@ finish:
if ((options & STREAM_ONLY_GET_HEADERS) || ignore_errors) {
reqok = 1;
}
/* status codes of 1xx are "informational", and will be followed by a real response
* e.g "100 Continue". RFC 7231 states that unexpected 1xx status MUST be parsed,
* and MAY be ignored. As such, we need to skip ahead to the "real" status*/
if (response_code >= 100 && response_code < 200) {
/* consume lines until we find a line starting 'HTTP/1' */
while (
!php_stream_eof(stream)
&& php_stream_get_line(stream, tmp_line, sizeof(tmp_line) - 1, &tmp_line_len) != NULL
&& ( tmp_line_len < sizeof("HTTP/1") - 1 || strncasecmp(tmp_line, "HTTP/1", sizeof("HTTP/1") - 1) )
);
if (tmp_line_len > 9) {
response_code = atoi(tmp_line + 9);
} else {
response_code = 0;
}
}
/* all status codes in the 2xx range are defined by the specification as successful;
* all status codes in the 3xx range are for redirection, and so also should never
* fail */
+1 -5
View File
@@ -90,11 +90,7 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count
}
}
if (!input->body->readfilters.head) {
/* If the input stream contains filters, it's not really seekable. The
input->position is likely to be wrong for unfiltered data. */
php_stream_seek(input->body, input->position, SEEK_SET);
}
php_stream_seek(input->body, input->position, SEEK_SET);
read = php_stream_read(input->body, buf, count);
if (!read || read == (size_t) -1) {
+1 -2
View File
@@ -57,8 +57,7 @@
newlen = (n); \
(d)->a = newlen < SMART_STR_START_SIZE \
? SMART_STR_START_SIZE \
: (newlen >= (INT_MAX - SMART_STR_PREALLOC)? newlen \
: (newlen + SMART_STR_PREALLOC)); \
: newlen + SMART_STR_PREALLOC; \
SMART_STR_DO_REALLOC(d, what); \
} else { \
newlen = (d)->len + (n); \
-2
View File
@@ -4,8 +4,6 @@ Bug #43008 (php://filter uris ignore url encoded filternames and can't handle sl
<?php
if (!extension_loaded("iconv")) die("skip iconv extension not available");
?>
--INI--
allow_url_fopen=1
--FILE--
<?php
$url = b""
+1 -1
View File
@@ -73,6 +73,6 @@ bool(true)
Warning: lchown() expects parameter 1 to be a valid path, array given in %s on line %d
bool(true)
Warning: lchown(): %r(Operation not permitted|Invalid argument)%r in %s on line %d
Warning: lchown(): Operation not permitted in %s on line %d
bool(false)
===DONE===
-33
View File
@@ -1,33 +0,0 @@
--TEST--
Bug #73297 (Ignore 100 Continue returned by HTTP/1.1 servers)
--INI--
allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
<?php
require 'server.inc';
$options = [
'http' => [
'protocol_version' => '1.1',
'header' => 'Connection: Close'
],
];
$ctx = stream_context_create($options);
$responses = [
"data://text/plain,HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\n\r\n"
. "Hello"
];
$pid = http_server('tcp://127.0.0.1:12342', $responses);
echo file_get_contents('http://127.0.0.1:12342/', false, $ctx);
echo "\n";
http_server_kill($pid);
?>
--EXPECT--
Hello
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #73203 (passing additional_parameters causes mail to fail)
--DESCRIPTION--
We're not really interested in testing mail() here, but it is currently the
only function besides mb_send_mail() which allows to call php_escape_shell_cmd()
with an empty string. Therefore we don't check the resulting email, but only
verify that the call succeeds.
--INI--
sendmail_path=cat >/dev/null
mail.add_x_header = Off
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) === 'WIN') die('skip won\'t run on Windows');
?>
--FILE--
<?php
var_dump(
mail('test@example.com', 'subject', 'message', 'From: lala@example.com', '')
);
?>
===DONE===
--EXPECT--
bool(true)
===DONE===
@@ -1,24 +0,0 @@
--TEST--
Bug #73144 (Use-afte-free in ArrayObject Deserialization)
--FILE--
<?php
try {
$token = 'a:2:{i:0;O:1:"0":2:0s:1:"0";i:0;s:1:"0";a:1:{i:0;C:11:"ArrayObject":7:0x:i:0;r0';
$obj = unserialize($token);
} catch(Exception $e) {
echo $e->getMessage()."\n";
}
try {
$inner = 'x:i:1;O:8:"stdClass":1:{};m:a:0:{}';
$exploit = 'C:11:"ArrayObject":'.strlen($inner).':{'.$inner.'}';
unserialize($exploit);
} catch(Exception $e) {
echo $e->getMessage()."\n";
}
?>
--EXPECTF--
Error at offset 6 of 7 bytes
Notice: ArrayObject::unserialize(): Unexpected end of serialized data in %sbug73341.php on line %d
Error at offset 24 of 34 bytes
-2
View File
@@ -1,7 +1,5 @@
--TEST--
bug 40459 - Test whether the constructor of the user-space stream wrapper is called when stream functions are called
--INI--
allow_url_fopen=1
--FILE--
<?php
// Test whether the constructor of the user-space stream wrapper is called when stream functions are called
-2
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #71323: Output of stream_get_meta_data can be falsified by its input
--INI--
allow_url_fopen=1
--FILE--
<?php
$file = 'data:text/plain;z=y;uri=eviluri;mediatype=wut?;mediatype2=hello,somedata';
@@ -1,16 +0,0 @@
--TEST--
E_ERROR during UserStream Open
--FILE--
<?php
class FailStream {
public function stream_open($path, $mode, $options, &$opened_path) {
_some_undefined_function();
}
}
stream_wrapper_register('mystream', 'FailStream');
fopen('mystream://foo', 'r');
echo 'Done';
--EXPECTF--
Fatal error: Call to undefined function _some_undefined_function() in %s%euser-stream-error.php on line %d
-30
View File
@@ -1,30 +0,0 @@
--TEST--
Bug #73192: parse_url return wrong hostname
--FILE--
<?php
var_dump(parse_url("http://example.com:80#@google.com/"));
var_dump(parse_url("http://example.com:80?@google.com/"));
?>
--EXPECT--
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(11) "example.com"
["port"]=>
int(80)
["fragment"]=>
string(12) "@google.com/"
}
array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(11) "example.com"
["port"]=>
int(80)
["query"]=>
string(12) "@google.com/"
}
@@ -763,9 +763,25 @@ echo "Done";
int(6)
}
--> http://?:/: bool(false)
--> http://?:/: array(3) {
["scheme"]=>
string(4) "http"
["host"]=>
string(1) "?"
["path"]=>
string(1) "/"
}
--> http://@?:/: bool(false)
--> http://@?:/: array(4) {
["scheme"]=>
string(4) "http"
["host"]=>
string(1) "?"
["user"]=>
string(0) ""
["path"]=>
string(1) "/"
}
--> file:///:: array(2) {
["scheme"]=>
@@ -98,8 +98,8 @@ echo "Done";
--> http://::? : string(4) "http"
--> http://::# : string(4) "http"
--> x://::6.5 : string(1) "x"
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : string(4) "http"
--> http://@?:/ : string(4) "http"
--> file:///: : string(4) "file"
--> file:///a:/ : string(4) "file"
--> file:///ab:/ : string(4) "file"
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : string(1) ":"
--> http://::# : string(1) ":"
--> x://::6.5 : string(1) ":"
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : string(1) "?"
--> http://@?:/ : string(1) "?"
--> file:///: : NULL
--> file:///a:/ : NULL
--> file:///ab:/ : NULL
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : int(6)
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : NULL
--> http://@?:/ : NULL
--> file:///: : NULL
--> file:///a:/ : NULL
--> file:///ab:/ : NULL
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : NULL
--> http://@?:/ : string(0) ""
--> file:///: : NULL
--> file:///a:/ : NULL
--> file:///ab:/ : NULL
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : NULL
--> http://@?:/ : NULL
--> file:///: : NULL
--> file:///a:/ : NULL
--> file:///ab:/ : NULL
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : string(1) "/"
--> http://@?:/ : string(1) "/"
--> file:///: : string(2) "/:"
--> file:///a:/ : string(3) "a:/"
--> file:///ab:/ : string(5) "/ab:/"
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : NULL
--> http://@?:/ : NULL
--> file:///: : NULL
--> file:///a:/ : NULL
--> file:///ab:/ : NULL
@@ -97,8 +97,8 @@ echo "Done";
--> http://::? : NULL
--> http://::# : NULL
--> x://::6.5 : NULL
--> http://?:/ : bool(false)
--> http://@?:/ : bool(false)
--> http://?:/ : NULL
--> http://@?:/ : NULL
--> file:///: : NULL
--> file:///a:/ : NULL
--> file:///ab:/ : NULL
+95 -53
View File
@@ -104,7 +104,7 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
ue = s + length;
/* parse scheme */
if ((e = memchr(s, ':', length)) && e != s) {
if ((e = memchr(s, ':', length)) && (e - s)) {
/* validate scheme */
p = s;
while (p < e) {
@@ -119,10 +119,10 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
p++;
}
if (e + 1 == ue) { /* only scheme is available */
if (*(e + 1) == '\0') { /* only scheme is available */
ret->scheme = estrndup(s, (e - s));
php_replace_controlchars_ex(ret->scheme, (e - s));
return ret;
goto end;
}
/*
@@ -134,39 +134,46 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
* correctly parse things like a.com:80
*/
p = e + 1;
while (p < ue && isdigit(*p)) {
while (isdigit(*p)) {
p++;
}
if ((p == ue || *p == '/') && (p - e) < 7) {
if ((*p == '\0' || *p == '/') && (p - e) < 7) {
goto parse_port;
}
ret->scheme = estrndup(s, (e-s));
php_replace_controlchars_ex(ret->scheme, (e - s));
s = e + 1;
length -= ++e - s;
s = e;
goto just_path;
} else {
ret->scheme = estrndup(s, (e-s));
php_replace_controlchars_ex(ret->scheme, (e - s));
if (e + 2 < ue && *(e + 2) == '/') {
if (*(e+2) == '/') {
s = e + 3;
if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
if (e + 3 < ue && *(e + 3) == '/') {
if (*(e + 3) == '/') {
/* support windows drive letters as in:
file:///c:/somedir/file.txt
*/
if (e + 5 < ue && *(e + 5) == ':') {
if (*(e + 5) == ':') {
s = e + 4;
}
goto just_path;
goto nohost;
}
}
} else {
s = e + 1;
goto just_path;
if (!strncasecmp("file", ret->scheme, sizeof("file"))) {
s = e + 1;
goto nohost;
} else {
length -= ++e - s;
s = e;
goto just_path;
}
}
}
} else if (e) { /* no scheme; starts with colon: look for port */
@@ -174,18 +181,18 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
p = e + 1;
pp = p;
while (pp < ue && pp - p < 6 && isdigit(*pp)) {
while (pp-p < 6 && isdigit(*pp)) {
pp++;
}
if (pp - p > 0 && pp - p < 6 && (pp == ue || *pp == '/')) {
if (pp - p > 0 && pp - p < 6 && (*pp == '/' || *pp == '\0')) {
long port;
memcpy(port_buf, p, (pp - p));
port_buf[pp - p] = '\0';
port = strtol(port_buf, NULL, 10);
if (port > 0 && port <= 65535) {
ret->port = (unsigned short) port;
if (s + 1 < ue && *s == '/' && *(s + 1) == '/') { /* relative-scheme URL */
if (*s == '/' && *(s + 1) == '/') { /* relative-scheme URL */
s += 2;
}
} else {
@@ -193,30 +200,43 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
efree(ret);
return NULL;
}
} else if (p == pp && pp == ue) {
} else if (p == pp && *pp == '\0') {
STR_FREE(ret->scheme);
efree(ret);
return NULL;
} else if (s + 1 < ue && *s == '/' && *(s + 1) == '/') { /* relative-scheme URL */
} else if (*s == '/' && *(s + 1) == '/') { /* relative-scheme URL */
s += 2;
} else {
goto just_path;
}
} else if (s + 1 < ue && *s == '/' && *(s + 1) == '/') { /* relative-scheme URL */
} else if (*s == '/' && *(s + 1) == '/') { /* relative-scheme URL */
s += 2;
} else {
goto just_path;
just_path:
ue = s + length;
goto nohost;
}
/* Binary-safe strcspn(s, "/?#") */
e = ue;
if ((p = memchr(s, '/', e - s))) {
e = p;
}
if ((p = memchr(s, '?', e - s))) {
e = p;
}
if ((p = memchr(s, '#', e - s))) {
if (!(p = memchr(s, '/', (ue - s)))) {
char *query, *fragment;
query = memchr(s, '?', (ue - s));
fragment = memchr(s, '#', (ue - s));
if (query && fragment) {
if (query > fragment) {
e = fragment;
} else {
e = query;
}
} else if (query) {
e = query;
} else if (fragment) {
e = fragment;
}
} else {
e = p;
}
@@ -238,16 +258,18 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
}
/* check for port */
if (s < ue && *s == '[' && *(e-1) == ']') {
if (*s == '[' && *(e-1) == ']') {
/* Short circuit portscan,
we're dealing with an
IPv6 embedded address */
p = NULL;
p = s;
} else {
p = zend_memrchr(s, ':', (e-s));
/* memrchr is a GNU specific extension
Emulate for wide compatibility */
for(p = e; p >= s && *p != ':'; p--);
}
if (p) {
if (p >= s && *p == ':') {
if (!ret->port) {
p++;
if (e-p > 5) { /* port cannot be longer then 5 characters */
@@ -295,34 +317,54 @@ PHPAPI php_url *php_url_parse_ex(char const *str, int length)
s = e;
just_path:
nohost:
e = ue;
p = memchr(s, '#', (e - s));
if (p) {
p++;
if (p < e) {
ret->fragment = estrndup(p, (e - p));
php_replace_controlchars_ex(ret->fragment, (e - p));
if ((p = memchr(s, '?', (ue - s)))) {
pp = memchr(s, '#', (ue - s));
if (pp && pp < p) {
if (pp - s) {
ret->path = estrndup(s, (pp-s));
php_replace_controlchars_ex(ret->path, (pp - s));
}
p = pp;
goto label_parse;
}
e = p-1;
}
p = memchr(s, '?', (e - s));
if (p) {
p++;
if (p < e) {
ret->query = estrndup(p, (e - p));
php_replace_controlchars_ex(ret->query, (e - p));
if (p - s) {
ret->path = estrndup(s, (p-s));
php_replace_controlchars_ex(ret->path, (p - s));
}
e = p-1;
}
if (s < e || s == ue) {
ret->path = estrndup(s, (e - s));
php_replace_controlchars_ex(ret->path, (e - s));
}
if (pp) {
if (pp - ++p) {
ret->query = estrndup(p, (pp-p));
php_replace_controlchars_ex(ret->query, (pp - p));
}
p = pp;
goto label_parse;
} else if (++p - ue) {
ret->query = estrndup(p, (ue-p));
php_replace_controlchars_ex(ret->query, (ue - p));
}
} else if ((p = memchr(s, '#', (ue - s)))) {
if (p - s) {
ret->path = estrndup(s, (p-s));
php_replace_controlchars_ex(ret->path, (p - s));
}
label_parse:
p++;
if (ue - p) {
ret->fragment = estrndup(p, (ue-p));
php_replace_controlchars_ex(ret->fragment, (ue - p));
}
} else {
ret->path = estrndup(s, (ue-s));
php_replace_controlchars_ex(ret->path, (ue - s));
}
end:
return ret;
}
/* }}} */
+1 -3
View File
@@ -14,7 +14,5 @@ echo wddx_serialize_value($xml, 'Variables') . "\n";
echo "DONE";
?>
--EXPECTF--
Warning: wddx_serialize_value(): Class SimpleXMLElement can not be serialized in %sbug45901.php on line %d
<wddxPacket version='1.0'><header><comment>Variables</comment></header><data></data></wddxPacket>
<wddxPacket version='1.0'><header><comment>Variables</comment></header><data><struct><var name='php_class_name'><string>SimpleXMLElement</string></var><var name='test'><struct><var name='php_class_name'><string>SimpleXMLElement</string></var></struct></var></struct></data></wddxPacket>
DONE
+1 -1
View File
@@ -1,5 +1,5 @@
--TEST--
Bug #72790: wddx_deserialize null dereference with invalid xml
Bug 72790: wddx_deserialize null dereference with invalid xml
--SKIPIF--
<?php
if (!extension_loaded('wddx')) {
-15
View File
@@ -1,15 +0,0 @@
--TEST--
Bug #73331 (NULL Pointer Dereference in WDDX Packet Deserialization with PDORow)
--SKIPIF--
<?php if (!extension_loaded("wddx") || !extension_loaded("pdo")) print "skip"; ?>
--FILE--
<?php
$wddx = "<wddxPacket version='1.0'><header/><data><struct><var name='php_class_name'><string>PDORow</string></var></struct></data></wddxPacket>";
var_dump(wddx_deserialize($wddx));
?>
--EXPECTF--
Warning: wddx_deserialize(): Class pdorow can not be unserialized in %s73331.php on line %d
NULL
-18
View File
@@ -1,18 +0,0 @@
--TEST--
Bug #73631 (Memory leak due to invalid wddx stack processing)
--SKIPIF--
<?php if (!extension_loaded("wddx")) print "skip"; ?>
--FILE--
<?php
$xml = <<<EOF
<?xml version="1.0" ?>
<wddxPacket version="1.0">
<number>1234</number>
<binary><boolean/></binary>
</wddxPacket>
EOF;
$wddx = wddx_deserialize($xml);
var_dump($wddx);
?>
--EXPECTF--
int(1234)
+30 -41
View File
@@ -471,26 +471,21 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
ulong idx;
char tmp_buf[WDDX_BUF_LEN];
HashTable *objhash, *sleephash;
zend_class_entry *ce;
PHP_CLASS_ATTRIBUTES;
TSRMLS_FETCH();
PHP_SET_CLASS_ATTRIBUTES(obj);
ce = Z_OBJCE_P(obj);
if (!ce || ce->serialize || ce->unserialize) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Class %s can not be serialized", class_name);
PHP_CLEANUP_CLASS_ATTRIBUTES();
return;
}
MAKE_STD_ZVAL(fname);
ZVAL_STRING(fname, "__sleep", 1);
/*
* We try to call __sleep() method on object. It's supposed to return an
* array of property names to be serialized.
*/
if (call_user_function_ex(CG(function_table), &obj, fname, &retval, 0, 0, 1, NULL TSRMLS_CC) == SUCCESS) {
if (retval && (sleephash = HASH_OF(retval))) {
PHP_CLASS_ATTRIBUTES;
PHP_SET_CLASS_ATTRIBUTES(obj);
php_wddx_add_chunk_static(packet, WDDX_STRUCT_S);
snprintf(tmp_buf, WDDX_BUF_LEN, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
php_wddx_add_chunk(packet, tmp_buf);
@@ -499,6 +494,8 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
php_wddx_add_chunk_static(packet, WDDX_STRING_E);
php_wddx_add_chunk_static(packet, WDDX_VAR_E);
PHP_CLEANUP_CLASS_ATTRIBUTES();
objhash = HASH_OF(obj);
for (zend_hash_internal_pointer_reset(sleephash);
@@ -519,6 +516,10 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
} else {
uint key_len;
PHP_CLASS_ATTRIBUTES;
PHP_SET_CLASS_ATTRIBUTES(obj);
php_wddx_add_chunk_static(packet, WDDX_STRUCT_S);
snprintf(tmp_buf, WDDX_BUF_LEN, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
php_wddx_add_chunk(packet, tmp_buf);
@@ -527,6 +528,8 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
php_wddx_add_chunk_static(packet, WDDX_STRING_E);
php_wddx_add_chunk_static(packet, WDDX_VAR_E);
PHP_CLEANUP_CLASS_ATTRIBUTES();
objhash = HASH_OF(obj);
for (zend_hash_internal_pointer_reset(objhash);
zend_hash_get_current_data(objhash, (void**)&ent) == SUCCESS;
@@ -548,8 +551,6 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
php_wddx_add_chunk_static(packet, WDDX_STRUCT_E);
}
PHP_CLEANUP_CLASS_ATTRIBUTES();
zval_dtor(fname);
FREE_ZVAL(fname);
@@ -811,11 +812,6 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
php_wddx_process_data(user_data, atts[i+1], strlen(atts[i+1]));
break;
}
} else {
ent.type = ST_BOOLEAN;
SET_STACK_VARNAME;
ZVAL_FALSE(&ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
}
} else if (!strcmp(name, EL_NULL)) {
ent.type = ST_NULL;
@@ -1016,31 +1012,26 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
pce = &PHP_IC_ENTRY;
}
if (pce != &PHP_IC_ENTRY && ((*pce)->serialize || (*pce)->unserialize)) {
zval_ptr_dtor(&ent2->data);
ent2->data = NULL;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Class %s can not be unserialized", Z_STRVAL_P(ent1->data));
} else {
/* Initialize target object */
MAKE_STD_ZVAL(obj);
object_init_ex(obj, *pce);
/* Initialize target object */
MAKE_STD_ZVAL(obj);
object_init_ex(obj, *pce);
/* Merge current hashtable with object's default properties */
zend_hash_merge(Z_OBJPROP_P(obj),
Z_ARRVAL_P(ent2->data),
(void (*)(void *)) zval_add_ref,
(void *) &tmp, sizeof(zval *), 0);
/* Merge current hashtable with object's default properties */
zend_hash_merge(Z_OBJPROP_P(obj),
Z_ARRVAL_P(ent2->data),
(void (*)(void *)) zval_add_ref,
(void *) &tmp, sizeof(zval *), 0);
if (incomplete_class) {
php_store_class_name(obj, Z_STRVAL_P(ent1->data), Z_STRLEN_P(ent1->data));
}
/* Clean up old array entry */
zval_ptr_dtor(&ent2->data);
/* Set stack entry to point to the newly created object */
ent2->data = obj;
if (incomplete_class) {
php_store_class_name(obj, Z_STRVAL_P(ent1->data), Z_STRLEN_P(ent1->data));
}
/* Clean up old array entry */
zval_ptr_dtor(&ent2->data);
/* Set stack entry to point to the newly created object */
ent2->data = obj;
/* Clean up class name var entry */
zval_ptr_dtor(&ent1->data);
} else if (Z_TYPE_P(ent2->data) == IS_OBJECT) {
@@ -1057,8 +1048,6 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
} else {
zend_hash_next_index_insert(target_hash, &ent1->data, sizeof(zval *), NULL);
}
} else if (!strcmp(name, EL_BINARY) && Z_STRLEN_P(ent1->data) < 1) {
zval_ptr_dtor(&ent1->data);
}
efree(ent1);
} else {
+9 -13
View File
@@ -15,7 +15,6 @@ static const char rcsid[] = "#(@) $Id$";
/* ENCODE -- Encode binary file into base64. */
#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
#include "base64.h"
@@ -32,9 +31,6 @@ void buffer_new(struct buffer_st *b)
void buffer_add(struct buffer_st *b, char c)
{
if ((INT_MAX - b->length) <= 512) {
return;
}
*(b->ptr++) = c;
b->offset++;
if (b->offset == b->length) {
@@ -58,13 +54,13 @@ void base64_encode_xmlrpc(struct buffer_st *b, const char *source, int length)
int i, hiteof = 0;
int offset = 0;
int olen;
olen = 0;
buffer_new(b);
/* Fill dtable with character encodings. */
for (i = 0; i < 26; i++) {
dtable[i] = 'A' + i;
dtable[26 + i] = 'a' + i;
@@ -74,16 +70,16 @@ void base64_encode_xmlrpc(struct buffer_st *b, const char *source, int length)
}
dtable[62] = '+';
dtable[63] = '/';
while (!hiteof) {
unsigned char igroup[3], ogroup[4];
int c, n;
igroup[0] = igroup[1] = igroup[2] = 0;
for (n = 0; n < 3; n++) {
c = *(source++);
offset++;
if (offset > length || offset <= 0) {
if (offset > length) {
hiteof = 1;
break;
}
@@ -94,11 +90,11 @@ void base64_encode_xmlrpc(struct buffer_st *b, const char *source, int length)
ogroup[1] = dtable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)];
ogroup[2] = dtable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)];
ogroup[3] = dtable[igroup[2] & 0x3F];
/* Replace characters in output stream with "=" pad
characters if fewer than three characters were
read from the end of the input stream. */
if (n < 3) {
ogroup[3] = '=';
if (n < 2) {
+1 -2
View File
@@ -80,7 +80,6 @@ static const char rcsid[] = "#(@) $Id$";
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "simplestring.h"
#define my_free(thing) if(thing) {free(thing); thing = 0;}
@@ -201,7 +200,7 @@ void simplestring_addn(simplestring* target, const char* source, size_t add_len)
simplestring_init_str(target);
}
if((INT_MAX - add_len) < target->len || (INT_MAX - add_len - 1) < target->len) {
if((SIZE_MAX - add_len) < target->len || (SIZE_MAX - add_len - 1) < target->len) {
/* check for overflows, if there's a potential overflow do nothing */
return;
}
+3 -3
View File
@@ -1701,7 +1701,7 @@ static ZIPARCHIVE_METHOD(addEmptyDir)
}
if (dirname[dirname_len-1] != '/') {
s=(char *)safe_emalloc(dirname_len, 1, 2);
s=(char *)emalloc(dirname_len+2);
strcpy(s, dirname);
s[dirname_len] = '/';
s[dirname_len+1] = '\0';
@@ -1915,14 +1915,14 @@ static ZIPARCHIVE_METHOD(addFromString)
ze_obj = (ze_zip_object*) zend_object_store_get_object(this TSRMLS_CC);
if (ze_obj->buffers_cnt) {
ze_obj->buffers = (char **)safe_erealloc(ze_obj->buffers, sizeof(char *), (ze_obj->buffers_cnt+1), 0);
ze_obj->buffers = (char **)erealloc(ze_obj->buffers, sizeof(char *) * (ze_obj->buffers_cnt+1));
pos = ze_obj->buffers_cnt++;
} else {
ze_obj->buffers = (char **)emalloc(sizeof(char *));
ze_obj->buffers_cnt++;
pos = 0;
}
ze_obj->buffers[pos] = (char *)safe_emalloc(buffer_len, 1, 1);
ze_obj->buffers[pos] = (char *)emalloc(buffer_len + 1);
memcpy(ze_obj->buffers[pos], buffer, buffer_len + 1);
zs = zip_source_buffer(intern, ze_obj->buffers[pos], buffer_len, 0);
+1 -1
View File
@@ -673,7 +673,7 @@ static PHP_FUNCTION(name) \
if (SUCCESS != php_zlib_encode(in_buf, in_len, &out_buf, &out_len, encoding, level TSRMLS_CC)) { \
RETURN_FALSE; \
} \
RETVAL_STRINGL_CHECK(out_buf, out_len, 0); \
RETURN_STRINGL(out_buf, out_len, 0); \
}
#define PHP_ZLIB_DECODE_FUNC(name, encoding) \
+3 -3
View File
@@ -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 29
#define PHP_RELEASE_VERSION 27
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "5.6.29"
#define PHP_VERSION_ID 50629
#define PHP_VERSION "5.6.27"
#define PHP_VERSION_ID 50627
+6 -11
View File
@@ -394,17 +394,12 @@ static php_stream *user_wrapper_opener(php_stream_wrapper *wrapper, const char *
MAKE_STD_ZVAL(zfuncname);
ZVAL_STRING(zfuncname, USERSTREAM_OPEN, 1);
zend_try {
call_result = call_user_function_ex(NULL,
&us->object,
zfuncname,
&zretval,
4, args,
0, NULL TSRMLS_CC);
} zend_catch {
FG(user_stream_current_filename) = NULL;
zend_bailout();
} zend_end_try();
call_result = call_user_function_ex(NULL,
&us->object,
zfuncname,
&zretval,
4, args,
0, NULL TSRMLS_CC);
if (call_result == SUCCESS && zretval != NULL && zval_is_true(zretval)) {
/* the stream is now open! */
-28
View File
@@ -1250,19 +1250,6 @@ mysqlnd.collect_statistics = On
; http://php.net/mysqlnd.collect_memory_statistics
mysqlnd.collect_memory_statistics = On
; Records communication from all extensions using mysqlnd to the specified log
; file.
; http://php.net/mysqlnd.debug
;mysqlnd.debug =
; Defines which queries will be logged.
; http://php.net/mysqlnd.log_mask
;mysqlnd.log_mask = 0
; Default size of the mysqlnd memory pool, which is used by result sets.
; http://php.net/mysqlnd.mempool_default_size
;mysqlnd.mempool_default_size = 16000
; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
; http://php.net/mysqlnd.net_cmd_buffer_size
;mysqlnd.net_cmd_buffer_size = 2048
@@ -1272,15 +1259,6 @@ mysqlnd.collect_memory_statistics = On
; http://php.net/mysqlnd.net_read_buffer_size
;mysqlnd.net_read_buffer_size = 32768
; Timeout for network requests in seconds.
; http://php.net/mysqlnd.net_read_timeout
;mysqlnd.net_read_timeout = 31536000
; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
; key.
; http://php.net/mysqlnd.sha256_server_public_key
;mysqlnd.sha256_server_public_key =
[OCI8]
; Connection: Enables privileged connections using external
@@ -1996,12 +1974,6 @@ ldap.max_links = -1
; Useful for internal debugging only.
;opcache.protect_memory=0
; Validate cached file permissions.
; opcache.validate_permission=0
; Prevent name collisions in chroot'ed environment.
; opcache.validate_root=0
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
-28
View File
@@ -1250,19 +1250,6 @@ mysqlnd.collect_statistics = On
; http://php.net/mysqlnd.collect_memory_statistics
mysqlnd.collect_memory_statistics = Off
; Records communication from all extensions using mysqlnd to the specified log
; file.
; http://php.net/mysqlnd.debug
;mysqlnd.debug =
; Defines which queries will be logged.
; http://php.net/mysqlnd.log_mask
;mysqlnd.log_mask = 0
; Default size of the mysqlnd memory pool, which is used by result sets.
; http://php.net/mysqlnd.mempool_default_size
;mysqlnd.mempool_default_size = 16000
; Size of a pre-allocated buffer used when sending commands to MySQL in bytes.
; http://php.net/mysqlnd.net_cmd_buffer_size
;mysqlnd.net_cmd_buffer_size = 2048
@@ -1272,15 +1259,6 @@ mysqlnd.collect_memory_statistics = Off
; http://php.net/mysqlnd.net_read_buffer_size
;mysqlnd.net_read_buffer_size = 32768
; Timeout for network requests in seconds.
; http://php.net/mysqlnd.net_read_timeout
;mysqlnd.net_read_timeout = 31536000
; SHA-256 Authentication Plugin related. File with the MySQL server public RSA
; key.
; http://php.net/mysqlnd.sha256_server_public_key
;mysqlnd.sha256_server_public_key =
[OCI8]
; Connection: Enables privileged connections using external
@@ -1996,12 +1974,6 @@ ldap.max_links = -1
; Useful for internal debugging only.
;opcache.protect_memory=0
; Validate cached file permissions.
; opcache.validate_permission=0
; Prevent name collisions in chroot'ed environment.
; opcache.validate_root=0
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
+1 -1
View File
@@ -27,7 +27,7 @@ $code = <<<EOT
<?php
echo "Test Start\n";
var_dump(
@\$_SERVER["HTTP_PROXY"],
\$_SERVER["HTTP_PROXY"],
\$_SERVER["HTTP_FOO"],
getenv("HTTP_PROXY"),
getenv("HTTP_FOO")
+2 -2
View File
@@ -3,13 +3,13 @@ cclient-2007f
freetype-2.6.2
icu-57.1
jpeglib-9b
libcurl-7.51.0
libcurl-7.50.3
libiconv-1.14
libmcrypt-2.5.8
libmpir-2.7.2
libpng-1.5.26
libpq-9.4.5
libssh2-1.8.0
libssh2-1.7.0
libtidy-20090406
libxslt-1.1.29
libxml-2.9.4