Compare commits

...
Author SHA1 Message Date
Julien Pauli 0c24fdb464 Prepare for 5.5.13RC1 2014-05-14 10:17:52 +02:00
Stanislav Malyshev b17efe82ff Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.30 next

Conflicts:
	configure.in
	main/php_version.h
2014-05-13 22:21:50 -07:00
Stanislav Malyshev b1c944dfd2 5.4.30 next 2014-05-13 22:20:15 -07:00
Stanislav Malyshev 6b6a58c904 enable email notifications
[skip ci]
2014-05-13 17:14:06 -07:00
Stanislav Malyshev de95dc7297 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  update NEWS
2014-05-13 17:08:06 -07:00
Stanislav Malyshev 09ea489aef update NEWS 2014-05-13 17:07:51 -07:00
Stanislav Malyshev ffd74a0a29 update NEWS 2014-05-13 17:07:35 -07:00
Stanislav Malyshev a03a1ab88c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
  Fix bug #67251 - date_parse_from_format out-of-bounds read
  Fix bug #67250 (iptcparse out-of-bounds read)

Conflicts:
	ext/date/lib/parse_date.c
	ext/date/lib/parse_date.re
2014-05-13 17:02:09 -07:00
Stanislav Malyshev dc92e81922 Merge branch 'bug67251' into PHP-5.4
* bug67251:
  Fix bug #67251 - date_parse_from_format out-of-bounds read

Conflicts:
	ext/date/lib/parse_date.c
2014-05-13 16:52:45 -07:00
Stanislav Malyshev 0094fd0969 Merge branch 'bug67252' into PHP-5.4
* bug67252:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
2014-05-13 16:47:27 -07:00
Stanislav Malyshev 9103c9eb4f Merge branch 'bug67250' into PHP-5.4
* bug67250:
  Fix bug #67250 (iptcparse out-of-bounds read)
2014-05-13 16:43:10 -07:00
Derick Rethans e3a48b3a43 Merge branch 'PHP-5.4' into PHP-5.5 2014-05-13 16:36:59 +01:00
Derick Rethans 3e276d6728 - Updated to version 2014.3 (2014c) 2014-05-13 16:36:58 +01:00
Stanislav Malyshev e3ca87265d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix test - output can be chunked
2014-05-12 10:54:34 -07:00
Stanislav Malyshev 6ef8e0f088 fix test - output can be chunked 2014-05-12 10:54:16 -07:00
Stanislav Malyshev c507c9f01b improve CURL tests to allow testing without separate server 2014-05-11 22:43:08 -07:00
Stanislav Malyshev 466b8aa444 fix bug #67253: timelib_meridian_with_check out-of-bounds read 2014-05-11 21:09:11 -07:00
Stanislav Malyshev 1e2818b143 Fix bug #67252: convert_uudecode out-of-bounds read 2014-05-11 20:29:27 -07:00
Stanislav Malyshev 0a80849250 Fix bug #67251 - date_parse_from_format out-of-bounds read 2014-05-11 19:34:21 -07:00
Stanislav Malyshev 3e9cb6a4a5 Fix bug #67250 (iptcparse out-of-bounds read) 2014-05-11 19:09:19 -07:00
Stanislav Malyshev af5cc61cf3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #67247	spl_fixedarray_resize integer overflow
  fix news
2014-05-11 18:16:19 -07:00
Stanislav Malyshev 291b45afb5 Fix bug #67248 (imageaffinematrixget missing check of parameters) 2014-05-11 18:14:57 -07:00
Stanislav Malyshev 2b475eebbe Fix bug #67247 spl_fixedarray_resize integer overflow 2014-05-11 17:54:27 -07:00
Stanislav Malyshev 14dd6c2d54 fix news 2014-05-11 17:43:28 -07:00
Stanislav Malyshev cdd1c1122e add tests stuff to README 2014-05-11 16:04:28 -07:00
Bob Weinand 5bc4eb714a Merge branch 'PHP-5.4' into PHP-5.5 2014-05-11 15:15:27 +02:00
Bob Weinand 62b2eb666d Updated NEWS 2014-05-11 15:13:40 +02:00
Bob Weinand 5bf6a093ad Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245)
Linux apparently does not like memcpy in overlapping regions...
2014-05-11 15:11:03 +02:00
Felipe Pena b99862e7ae Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org)
2014-05-11 09:46:25 -03:00
Felipe Pena fb3b8de98d - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org) 2014-05-11 09:45:17 -03:00
Felipe Pena 16b293de50 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Move checking
2014-05-10 11:55:45 -03:00
Felipe Pena c575ab0c88 - Move checking 2014-05-10 11:55:42 -03:00
Felipe Pena 8bea8cf9cd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed missing NULL check in SimpleXMLElement::xpath()
2014-05-10 11:53:45 -03:00
Felipe Pena 345f6d90d5 - Fixed missing NULL check in SimpleXMLElement::xpath() 2014-05-10 11:53:40 -03:00
Felipe Pena 2379ec474e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed missing NULL check
2014-05-10 11:39:28 -03:00
Felipe Pena 5bd443a452 - Fixed missing NULL check 2014-05-10 11:39:08 -03:00
Anatol Belski c62f32c3cc Bug #67238 Ungreedy and min/max quantifier bug in PCRE 8.34 upstream
upstream patch applied
2014-05-09 22:15:54 +02:00
Stanislav Malyshev cf2b9955d4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  oops, 5.4 and 5.5 use malloc in TSRM
2014-05-08 02:00:23 -07:00
Stanislav Malyshev 4392339c3e oops, 5.4 and 5.5 use malloc in TSRM 2014-05-08 01:59:39 -07:00
Stanislav Malyshev e9be93b333 make release tags not fail Travis CI 2014-05-08 01:11:29 -07:00
Stanislav Malyshev a444900c8d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix memory leak in TSRM
2014-05-08 01:00:51 -07:00
Stanislav Malyshev 0cc18fdfba Fix memory leak in TSRM 2014-05-08 01:00:34 -07:00
Ferenc Kovacs 8e2d396b52 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed test (it requires ext/hash)
2014-05-07 00:55:05 +02:00
Dmitry Stogov 8517001b25 Fixed test (it requires ext/hash) 2014-05-07 00:52:49 +02:00
Ferenc Kovacs 579898e338 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed tests (they might fail from time to time because of session GC)
  Fix author name on the #63228 patch.
2014-05-07 00:38:32 +02:00
Dmitry Stogov f880013c4d Fixed tests (they might fail from time to time because of session GC) 2014-05-07 00:37:56 +02:00
Ferenc Kovacs 58f4bf441a only build and test nts non-debug and ts debug builds as discussed at https://github.com/php/php-src/pull/654 2014-05-03 02:50:37 +02:00
Adam Harvey d8ff8f6f20 Fix author name on the #63228 patch. 2014-05-02 10:24:09 -07:00
Adam Harvey f7cb87f333 Fix author name on the #63228 patch. 2014-05-02 10:23:09 -07:00
Ferenc Kovacs 192b35382a Revert "show leaks in their own group"
using valgrind would be a bit too much for travis I guess.

This reverts commit ea60d79e23.
2014-05-02 09:49:10 +02:00
Ferenc Kovacs ea60d79e23 show leaks in their own group 2014-05-02 09:32:42 +02:00
Adam Harvey eb46096608 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Use the right path for the suggested PHP invocation in ext_skel.
2014-05-01 11:22:46 -07:00
Adam Harvey 941c39bd06 Use the right path for the suggested PHP invocation in ext_skel.
Fixes bug #67160 (ext_skel outputs incorrect information).
2014-05-01 11:22:20 -07:00
76 changed files with 1228 additions and 912 deletions

No files matched your search

+2 -3
View File
@@ -5,7 +5,8 @@ php:
- 5.4
notifications:
email: false
email:
on_failure: change
env:
global:
@@ -18,8 +19,6 @@ env:
- REPORT_EXIT_STATUS=1
matrix:
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=0
- ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=1
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
before_script:
+17 -2
View File
@@ -1,6 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.5.13
15 May 2014, PHP 5.5.13RC1
- CLI server:
. Fixed bug #67079 (Missing MIME types for XML/XSL files). (Anatol)
@@ -12,12 +12,19 @@ PHP NEWS
. Fixed bug #65701 (copy() doesn't work when destination filename is created
by tempnam()). (Boro Sitnikovski)
. Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
. Fixed bug #67245 (usage of memcpy() with overlapping src and dst in
zend_exceptions.c). (Bob)
. Fixed bug #67247 (spl_fixedarray_resize integer overflow). (Stas)
. Fixed bug #67250 (iptcparse out-of-bounds read). (Stas)
. Fixed bug #67252 (convert_uudecode out-of-bounds read). (Stas)
- Curl:
. Fixed bug #64247 (CURLOPT_INFILE doesn't allow reset). (Mike)
- Date:
. Fixed bug #67118 (DateTime constructor crash with invalid data). (Anatol)
. Fixed bug #67251 (date_parse_from_format out-of-bounds read). (Stas)
. Fixed bug #67253 (timelib_meridian_with_check out-of-bounds read). (Stas)
- DOM:
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
@@ -30,6 +37,13 @@ PHP NEWS
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
(Julio Pintos)
- GD:
. Fixed bug #67248 (imageaffinematrixget missing check of parameters). (Stas)
- PCRE:
. Fixed bug #67238 (Ungreedy and min/max quantifier bug, applied patch
from the upstream). (Anatol)
- Phar:
. Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent
in its name). (PR #588)
@@ -1272,7 +1286,8 @@ spaces) (willfitch, iliaa)
. Fixed bug #63999 (php with fpm fails to build on Solaris 10 or 11). (Adam)
- Litespeed:
. Fixed bug #63228 (-Werror=format-security error in lsapi code). (George)
. Fixed bug #63228 (-Werror=format-security error in lsapi code).
(Elan Ruusamäe, George)
- ext/sqlite3:
. Fixed bug #63921 (sqlite3::bindvalue and relative PHP functions aren't
+32 -19
View File
@@ -11,17 +11,27 @@ because the sysadmins can not upgrade stuff then.
2. Package two days before a release. So if the release is to be on Thursday,
package on Tuesday. Think about timezones as well.
3. Ensure that Windows builds will work before packaging
3. Ensure that the tests on Travis CI are green.
See: https://travis-ci.org/php/php-src/builds
It is recommended to do so a couple of days before the packaging day, to
have enough time to investigate failures, communicate with the authors and
commit the fixes.
The RM for the branch is also responsible for keeping the CI green on
ongoing bases between the releases. Check the CI status for your branch
periodically and resolve the failures ASAP. See more in:
https://wiki.php.net/rfc/travis_ci
4. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
4. Ensure that Windows builds will work before packaging
5. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
Johannes/Stas/Derick/Ilia) before proceeding. Ideally make sure that for the
first releases one of the previous RM's is around to answer questions. For the
steps related to the php/QA/bug websites try to have someone from the webmaster
team (Bjori) on hand.
5. Verify the tags to be extra sure everything was tagged properly.
6. Verify the tags to be extra sure everything was tagged properly.
6. Moving extensions from/to PECL requires write acces to the destination.
7. Moving extensions from/to PECL requires write acces to the destination.
Most developers should have this.
Moving extensions from php-src to PECL
@@ -48,47 +58,49 @@ Rolling a non stable release (alpha/beta/RC)
1. Check windows snapshot builder logs (http://windows.php.net/downloads/snaps/ the last revision)
2. run the "scripts/dev/credits" script in php-src and commit the changes in the
2. Check the tests at https://travis-ci.org/php/php-src/builds
3. run the "scripts/dev/credits" script in php-src and commit the changes in the
credits files in ext/standard.
3. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
4. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
5. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
Do not use abbreviations for alpha and beta. Do not use dashes, you should
``#define PHP_VERSION "5.4.22RC1"`` and not ``#define PHP_VERSION "5.4.22-RC1"``
5. Compile and make test, with and without ZTS, using the right Bison version
6. Compile and make test, with and without ZTS, using the right Bison version
(for example, for 5.5, Bison 2.4.1 is used)
6. Check ./sapi/cli/php -v output for version matching.
7. Check ./sapi/cli/php -v output for version matching.
7. If all is right, commit the changes to the release branch with ``git commit -a``.
8. If all is right, commit the changes to the release branch with ``git commit -a``.
8. Tag the repository release branch with the version, e.g.:
9. Tag the repository release branch with the version, e.g.:
``git tag -u YOURKEYID php-5.4.2RC2``
9. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
10. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
in the *main* branch (PHP-5.4 for example) to prepare for the **next** version.
F.e. if the RC is "5.4.1RC1" then the new one should be "5.4.2-dev" - regardless if we get
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
Commit the changes to the main branch.
10. Push the changes to the main repo, the tag, the main branch and the release branch :
11. Push the changes to the main repo, the tag, the main branch and the release branch :
``git push --tags origin HEAD``
``git push origin {main branch}``
``git push origin {release branch}``
11. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
12. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
and build three tarballs (gz, bz2 and xz).
12. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
13. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
directory "downloads/". Copy them into there, so that the system can generate
MD5 sums. If you do not have this directory, talk to Derick or Dan.
13. Now the RC can be found on http://downloads.php.net/yourname,
14. Now the RC can be found on http://downloads.php.net/yourname,
f.e. http://downloads.php.net/derick/
14. Once the release has been tagged, contact the PHP Windows development team
15. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created. Once
those are made, they should be placed into the same directory as the source snapshots.
@@ -144,7 +156,8 @@ the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
Don't forget to update NEWS manually in an extra commit then.
3. Commit those changes
3. Commit those changes. Ensure the tests at https://travis-ci.org/php/php-src/builds are
still passing.
4. run the "scripts/dev/credits" script in php-src and commit the changes in the
credits files in ext/standard.
@@ -154,7 +167,7 @@ credits files in ext/standard.
6. Check ./sapi/cli/php -v output for version matching.
7. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
7. tag the repository with the version f.e. "``git tag -u YOURKEYID -s php-5.4.1``"
8. Push the tag f.e. "``git push origin php-5.4.1``"
+1 -1
View File
@@ -363,7 +363,7 @@ ZEND_METHOD(error_exception, getSeverity)
#define TRACE_ARG_APPEND(vallen) \
*str = (char*)erealloc(*str, *len + 1 + vallen); \
memcpy((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
memmove((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
/* }}} */
+1 -1
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=5
PHP_RELEASE_VERSION=13
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION="RC1"
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`
+6
View File
@@ -229,6 +229,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
#endif
if (php_check_open_basedir(path_copy TSRMLS_CC)) {
#ifdef VIRTUAL_DIR
free(path_copy);
#endif
return NULL;
}
@@ -238,6 +241,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
if (opened_path && bz_file) {
*opened_path = estrdup(path_copy);
}
#ifdef VIRTUAL_DIR
free(path_copy);
#endif
path_copy = NULL;
if (bz_file == NULL) {
+4 -7
View File
@@ -4,18 +4,15 @@ Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files)
error_reporting = E_ALL & ~E_DEPRECATED
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
include 'skipif.inc';
?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 0);
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+44
View File
@@ -0,0 +1,44 @@
--TEST--
Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files)
--INI--
error_reporting = E_ALL & ~E_DEPRECATED
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt');
$params = array('file' => $file);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
var_dump(curl_exec($ch));
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain");
$params = array('file' => $file);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
var_dump(curl_exec($ch));
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', null, "foo.txt");
$params = array('file' => $file);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
var_dump(curl_exec($ch));
$file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain", "foo.txt");
$params = array('file' => $file);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
var_dump(curl_exec($ch));
curl_close($ch);
?>
--EXPECTF--
string(%d) "curl_testdata1.txt|application/octet-stream"
string(%d) "curl_testdata1.txt|text/plain"
string(%d) "foo.txt|application/octet-stream"
string(%d) "foo.txt|text/plain"
-3
View File
@@ -8,9 +8,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x071100) {
exit("skip: test works only with curl >= 7.17.0");
-3
View File
@@ -5,9 +5,6 @@ Bug #46711 (lost memory when foreach is used for values passed to curl_setopt())
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
--FILE--
<?php
+3 -10
View File
@@ -1,24 +1,17 @@
--TEST--
Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include 'server.inc';
$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_STDERR, $fp);
curl_setopt($ch, CURLOPT_URL, getenv('PHP_CURL_HTTP_REMOTE_SERVER'));
curl_setopt($ch, CURLOPT_URL, curl_cli_server_start());
fclose($fp); // <-- premature close of $fp caused a crash!
+3 -8
View File
@@ -2,16 +2,11 @@
Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
include 'skipif.inc';
?>
--FILE--
<?php
include 'server.inc';
function checkForClosedFilePointer($curl_option, $description) {
$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
@@ -21,7 +16,7 @@ function checkForClosedFilePointer($curl_option, $description) {
$options = array(
CURLOPT_RETURNTRANSFER => 1,
$curl_option => $fp,
CURLOPT_URL => getenv("PHP_CURL_HTTP_REMOTE_SERVER")
CURLOPT_URL => curl_cli_server_start()
);
// we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly
+3 -2
View File
@@ -4,7 +4,7 @@ Test curl_setopt() CURLOPT_FILE readonly file handle
Mark van der Velden
#testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/*
@@ -14,7 +14,8 @@ Mark van der Velden
*/
// Figure out what handler to use
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
if(!empty($host)) {
// Use the set Environment variable
+3 -7
View File
@@ -2,12 +2,7 @@
Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
include 'skipif.inc';
?>
--FILE--
<?php
@@ -47,7 +42,8 @@ $options_to_check = array(
"CURLOPT_INFILE"
);
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
foreach($options_to_check as $option) {
checkForClosedFilePointer($host, constant($option), $option);
}
+4 -8
View File
@@ -2,20 +2,16 @@
Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
include 'skipif.inc';
if ($curl_version['version_number'] > 0x070a08) {
exit("skip: tests works a versions of curl >= 7.10.8");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+3 -3
View File
@@ -2,8 +2,7 @@
Test curl_opt() function with POST params from array with a numeric key
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
include 'skipinf.inc';
?>
--FILE--
<?php
@@ -13,7 +12,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl sending through GET an POST ***' . "\n";
+3 -10
View File
@@ -1,18 +1,11 @@
--TEST--
Bug #66109 (Option CURLOPT_CUSTOMREQUEST can't be reset to default.)
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=method");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+4 -2
View File
@@ -4,12 +4,14 @@ Test CURLOPT_READDATA without a callback function
Mattijs Hoitink mattijshoitink@gmail.com
#Testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include 'server.inc';
$host = curl_cli_server_start();
// The URL to POST to
$url = getenv('PHP_CURL_HTTP_REMOTE_SERVER') . '/get.php?test=post';
$url = $host . '/get.php?test=post';
// Create a temporary file to read the data from
$tempname = tempnam(sys_get_temp_dir(), 'CURL_DATA');
+3 -6
View File
@@ -4,10 +4,7 @@ Test curl_exec() function with basic functionality
Sebastian Deutsch <sebastian.deutsch@9elements.com>
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_exec(resource ch)
@@ -15,8 +12,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Source code: ext/curl/interface.c
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** Testing curl_exec() : basic functionality ***\n";
+3 -5
View File
@@ -4,10 +4,7 @@ Test curl_opt() function with CURLOPT_RETURNTRANSFER parameter set to 1
Sebastian Deutsch <sebastian.deutsch@9elements.com>
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ***' . "\n";
+3 -5
View File
@@ -4,10 +4,7 @@ Test curl_opt() function with POST parameters
Sebastian Deutsch <sebastian.deutsch@9elements.com>
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl sending through GET an POST ***' . "\n";
+3 -5
View File
@@ -4,10 +4,7 @@ Test curl_opt() function with setting referer
Sebastian Deutsch <sebastian.deutsch@9elements.com>
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl setting referer ***' . "\n";
+3 -5
View File
@@ -4,10 +4,7 @@ Test curl_opt() function with user agent
Sebastian Deutsch <sebastian.deutsch@9elements.com>
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -16,7 +13,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with user agent ***' . "\n";
+8 -8
View File
@@ -4,10 +4,7 @@ Test curl_opt() function with CURLOPT_WRITEFUNCTION parameter set to a closure
?
TestFest 2009 - AFUP - Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -16,23 +13,26 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl_setopt($ch, CURLOPT_WRITEFUNCTION, <closure>); ***' . "\n";
$url = "{$host}/get.php?test=get";
$ch = curl_init();
$alldata = '';
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
curl_setopt($ch, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
echo 'Data: '.$data;
$GLOBALS['alldata'] .= $data;
return strlen ($data);
});
curl_exec($ch);
curl_close($ch);
ob_end_flush();
echo "Data: $alldata";
?>
===DONE===
--EXPECTF--
+3 -2
View File
@@ -3,7 +3,7 @@ Test curl_opt() function with COOKIE
--CREDITS--
TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with cookie ***' . "\n";
+3 -2
View File
@@ -3,7 +3,7 @@ Test curl_opt() function with CURLOPT_HTTP_VERSION/CURL_HTTP_VERSION_1_0
--CREDITS--
TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with HTTP/1.0 ***' . "\n";
+3 -2
View File
@@ -3,7 +3,7 @@ Test curl_opt() function with CURLOPT_HTTP_VERSION/CURL_HTTP_VERSION_1_1
--CREDITS--
TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com>
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo '*** Testing curl with HTTP/1.1 ***' . "\n";
+3 -2
View File
@@ -3,7 +3,7 @@ Test curl_multi_exec() function with basic functionality
--CREDITS--
TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_multi_exec(resource ch)
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** Testing curl_exec() : basic functionality ***\n";
+3 -2
View File
@@ -3,7 +3,7 @@ Test curl_setopt() with curl_multi function with basic functionality
--CREDITS--
TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/* Prototype : bool curl_setopt(resource ch, int option, mixed value)
@@ -12,7 +12,8 @@ TestFest 2009 - AFUP - Thomas Rabaix <thomas.rabaix@gmail.com>
* Alias to functions:
*/
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** Testing curl_exec() : basic functionality ***\n";
+4 -7
View File
@@ -3,22 +3,19 @@ Test curl_getinfo() function with CURLINFO_EFFECTIVE_URL parameter
--CREDITS--
Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php?test=";
$url = "http://{$host}/get.php?test=";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
$info = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
var_dump($url == $info);
curl_close($ch);
?>
===DONE===
+3 -5
View File
@@ -3,13 +3,11 @@ Test curl_getinfo() function with CURLINFO_HTTP_CODE parameter
--CREDITS--
Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php?test=";
$ch = curl_init();
+3 -5
View File
@@ -3,13 +3,11 @@ Test curl_getinfo() function with CURLINFO_CONTENT_TYPE parameter
--CREDITS--
Jean-Marc Fontaine <jmf@durcommefaire.net>
--SKIPIF--
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php?test=contenttype";
$ch = curl_init();
@@ -4,11 +4,12 @@ Test curl_copy_handle() with simple get
Rick Buitenman <rick@meritos.nl>
#testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
echo '*** Testing curl copy handle with simple GET ***' . "\n";
@@ -4,10 +4,11 @@ Test curl_copy_handle() with simple POST
Rick Buitenman <rick@meritos.nl>
#testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
echo '*** Testing curl copy handle with simple POST ***' . "\n";
@@ -4,11 +4,12 @@ Test curl_copy_handle() after exec()
Rick Buitenman <rick@meritos.nl>
#testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
echo '*** Test curl_copy_handle() after exec() ***' . "\n";
@@ -4,11 +4,12 @@ Test curl_copy_handle() after exec() with POST
Rick Buitenman <rick@meritos.nl>
#testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
echo '*** Test curl_copy_handle() after exec() with POST ***' . "\n";
@@ -4,11 +4,12 @@ Test curl_copy_handle() with User Agent
Rick Buitenman <rick@meritos.nl>
#testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
echo '*** Testing curl copy handle with User Agent ***' . "\n";
@@ -1,10 +1,11 @@
--TEST--
Test curl_copy_handle() with simple POST
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
echo '*** Testing curl copy handle with simple POST using array as arguments ***' . "\n";
@@ -1,10 +1,11 @@
--TEST--
Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$url = "{$host}/get.php";
$ch = curl_init($url);
@@ -3,11 +3,13 @@ Memory corruption error if fp of just created file is closed before curl_close.
--CREDITS--
Alexey Shein <confik@gmail.com>
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$ch = curl_init(getenv('PHP_CURL_HTTP_REMOTE_SERVER'));
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init($host);
$temp_file = dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp';
if (file_exists($temp_file)) {
+3 -9
View File
@@ -1,14 +1,7 @@
--TEST--
CURL file uploading
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
@@ -25,7 +18,8 @@ function testcurl($ch, $name, $mime = '', $postname = '')
var_dump(curl_exec($ch));
}
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -4,12 +4,7 @@ Curl_multi_getcontent() basic test with different sources (local file/http)
Rein Velt (rein@velt.org)
#TestFest Utrecht 20090509
--SKIPIF--
<?php
if (!extension_loaded('curl')) print 'skip need ext/curl';
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
//CURL_MULTI_GETCONTENT TEST
@@ -19,7 +14,8 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=getpost&get_param=Hello%20World");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
+3 -2
View File
@@ -4,7 +4,7 @@ curl_setopt_array() function - tests setting multiple cURL options with curl_set
Mattijs Hoitink mattijshoitink@gmail.com
#Testfest Utrecht 2009
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
/*
@@ -15,7 +15,8 @@ Mattijs Hoitink mattijshoitink@gmail.com
*/
// Figure out what handler to use
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
if (!empty($host)) {
// Use the set Environment variable
$url = "{$host}/get.php?test=get";
+3 -2
View File
@@ -4,11 +4,12 @@ curl_setopt basic tests with CURLOPT_STDERR.
Paul Sohier
#phptestfest utrecht
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** Testing curl_setopt with CURLOPT_STDERR\n";
+3 -2
View File
@@ -4,11 +4,12 @@ curl_setopt() call with CURLOPT_HTTPHEADER
Paul Sohier
#phptestfest utrecht
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** curl_setopt() call with CURLOPT_HTTPHEADER\n";
+3 -2
View File
@@ -4,11 +4,12 @@ curl_setopt() call with CURLOPT_RETURNTRANSFER
Paul Sohier
#phptestfest utrecht
--SKIPIF--
<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
// start testing
echo "*** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 1\n";
+1 -8
View File
@@ -1,14 +1,7 @@
--TEST--
Test curl_version() function : error conditions
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
die('skip - curl extension not available in this build');
}
if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
}
?>
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
--FILE--
<?php
+1 -8
View File
@@ -1,14 +1,7 @@
--TEST--
Test curl_version() function : usage variations - test values for $ascii argument
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
echo "skip - curl extension not available in this build";
}
if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
}
?>
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
--FILE--
<?php
+4 -10
View File
@@ -4,16 +4,9 @@ Test curl option CURLOPT_HEADERFUNCTION
Mathieu Kooiman <mathieuk@gmail.com>
Dutch UG, TestFest 2009, Utrecht
--DESCRIPTION--
Hit the host identified by PHP_CURL_HTTP_REMOTE_SERVER and determine that the headers are sent to the callback specified for CURLOPT_HEADERFUNCTION. Different test servers specified for PHP_CURL_HTTP_REMOTE_SERVER might return different sets of headers. Just test for HTTP/1.1 200 OK.
Hit the host and determine that the headers are sent to the callback specified for CURLOPT_HEADERFUNCTION. Different test servers might return different sets of headers. Just test for HTTP/1.1 200 OK.
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
echo "skip - curl extension not available in this build";
}
if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
}
?>
<?php include 'skipif.inc'; ?>
--FILE--
<?php
@@ -23,7 +16,8 @@ function curl_header_callback($curl_handle, $data)
echo $data;
}
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
include 'server.inc';
$host = curl_cli_server_start();
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+56
View File
@@ -0,0 +1,56 @@
<?php
define ("PHP_CURL_SERVER_HOSTNAME", "localhost");
define ("PHP_CURL_SERVER_PORT", 8964);
define ("PHP_CURL_SERVER_ADDRESS", PHP_CURL_SERVER_HOSTNAME.":".PHP_CURL_SERVER_PORT);
function curl_cli_server_start() {
if(getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
return getenv('PHP_CURL_HTTP_REMOTE_SERVER');
}
$php_executable = getenv('TEST_PHP_EXECUTABLE');
$doc_root = __DIR__;
$router = "responder/get.php";
$descriptorspec = array(
0 => STDIN,
1 => STDOUT,
2 => STDERR,
);
if (substr(PHP_OS, 0, 3) == 'WIN') {
$cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
$cmd .= " {$router}";
$handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true));
} else {
$cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
$cmd .= " {$router}";
$cmd .= " 2>/dev/null";
$handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root);
}
// note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.'
// it might not be listening yet...need to wait until fsockopen() call returns
$i = 0;
while (($i++ < 30) && !($fp = @fsockopen(PHP_CURL_SERVER_HOSTNAME, PHP_CURL_SERVER_PORT))) {
usleep(10000);
}
if ($fp) {
fclose($fp);
}
register_shutdown_function(
function($handle) use($router) {
proc_terminate($handle);
},
$handle
);
// don't bother sleeping, server is already up
// server can take a variable amount of time to be up, so just sleeping a guessed amount of time
// does not work. this is why tests sometimes pass and sometimes fail. to get a reliable pass
// sleeping doesn't work.
return PHP_CURL_SERVER_ADDRESS;
}
+7
View File
@@ -0,0 +1,7 @@
<?php
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
if(false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
if (php_sapi_name() != "cli") {
die("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
}
+107 -100
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Thu Feb 6 07:35:53 2014 */
/* Generated by re2c 0.13.5 on Tue May 13 17:01:57 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -401,9 +401,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
{
timelib_sll retval = 0;
while (!strchr("AaPp", **ptr)) {
while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
if(!**ptr) {
return TIMELIB_UNSET;
}
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;
@@ -837,11 +840,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
#line 963 "ext/date/lib/parse_date.re"
#line 966 "ext/date/lib/parse_date.re"
#line 845 "ext/date/lib/parse_date.c"
#line 848 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -961,7 +964,7 @@ std:
}
yy2:
YYDEBUG(2, *YYCURSOR);
#line 1049 "ext/date/lib/parse_date.re"
#line 1052 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -977,7 +980,7 @@ yy2:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 981 "ext/date/lib/parse_date.c"
#line 984 "ext/date/lib/parse_date.c"
yy3:
YYDEBUG(3, *YYCURSOR);
++YYCURSOR;
@@ -1000,7 +1003,7 @@ yy3:
}
yy4:
YYDEBUG(4, *YYCURSOR);
#line 1643 "ext/date/lib/parse_date.re"
#line 1646 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1013,7 +1016,7 @@ yy4:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 1017 "ext/date/lib/parse_date.c"
#line 1020 "ext/date/lib/parse_date.c"
yy5:
YYDEBUG(5, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1324,12 +1327,12 @@ yy12:
if (yych <= '9') goto yy1385;
yy13:
YYDEBUG(13, *YYCURSOR);
#line 1738 "ext/date/lib/parse_date.re"
#line 1741 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
#line 1333 "ext/date/lib/parse_date.c"
#line 1336 "ext/date/lib/parse_date.c"
yy14:
YYDEBUG(14, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2386,11 +2389,11 @@ yy49:
if (yych <= '9') goto yy55;
yy50:
YYDEBUG(50, *YYCURSOR);
#line 1727 "ext/date/lib/parse_date.re"
#line 1730 "ext/date/lib/parse_date.re"
{
goto std;
}
#line 2394 "ext/date/lib/parse_date.c"
#line 2397 "ext/date/lib/parse_date.c"
yy51:
YYDEBUG(51, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2399,12 +2402,12 @@ yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
YYDEBUG(53, *YYCURSOR);
#line 1732 "ext/date/lib/parse_date.re"
#line 1735 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 2408 "ext/date/lib/parse_date.c"
#line 2411 "ext/date/lib/parse_date.c"
yy54:
YYDEBUG(54, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2791,7 +2794,7 @@ yy72:
if (yych == 's') goto yy74;
yy73:
YYDEBUG(73, *YYCURSOR);
#line 1711 "ext/date/lib/parse_date.re"
#line 1714 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2806,7 +2809,7 @@ yy73:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2810 "ext/date/lib/parse_date.c"
#line 2813 "ext/date/lib/parse_date.c"
yy74:
YYDEBUG(74, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3568,7 +3571,7 @@ yy166:
}
yy167:
YYDEBUG(167, *YYCURSOR);
#line 1574 "ext/date/lib/parse_date.re"
#line 1577 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3585,7 +3588,7 @@ yy167:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
#line 3589 "ext/date/lib/parse_date.c"
#line 3592 "ext/date/lib/parse_date.c"
yy168:
YYDEBUG(168, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4105,7 +4108,7 @@ yy193:
}
yy194:
YYDEBUG(194, *YYCURSOR);
#line 1633 "ext/date/lib/parse_date.re"
#line 1636 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4114,7 +4117,7 @@ yy194:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4118 "ext/date/lib/parse_date.c"
#line 4121 "ext/date/lib/parse_date.c"
yy195:
YYDEBUG(195, *YYCURSOR);
++YYCURSOR;
@@ -4165,7 +4168,7 @@ yy198:
}
yy199:
YYDEBUG(199, *YYCURSOR);
#line 1379 "ext/date/lib/parse_date.re"
#line 1382 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -4178,7 +4181,7 @@ yy199:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4182 "ext/date/lib/parse_date.c"
#line 4185 "ext/date/lib/parse_date.c"
yy200:
YYDEBUG(200, *YYCURSOR);
yyaccept = 6;
@@ -4447,7 +4450,7 @@ yy222:
}
yy223:
YYDEBUG(223, *YYCURSOR);
#line 1681 "ext/date/lib/parse_date.re"
#line 1684 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4476,7 +4479,7 @@ yy223:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4480 "ext/date/lib/parse_date.c"
#line 4483 "ext/date/lib/parse_date.c"
yy224:
YYDEBUG(224, *YYCURSOR);
yyaccept = 7;
@@ -5174,7 +5177,7 @@ yy278:
YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
YYDEBUG(279, *YYCURSOR);
#line 1657 "ext/date/lib/parse_date.re"
#line 1660 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5197,7 +5200,7 @@ yy278:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 5201 "ext/date/lib/parse_date.c"
#line 5204 "ext/date/lib/parse_date.c"
yy280:
YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5375,7 +5378,7 @@ yy294:
++YYCURSOR;
yy295:
YYDEBUG(295, *YYCURSOR);
#line 1351 "ext/date/lib/parse_date.re"
#line 1354 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5388,7 +5391,7 @@ yy295:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 5392 "ext/date/lib/parse_date.c"
#line 5395 "ext/date/lib/parse_date.c"
yy296:
YYDEBUG(296, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6608,7 +6611,7 @@ yy362:
if (yych <= '9') goto yy365;
yy364:
YYDEBUG(364, *YYCURSOR);
#line 1495 "ext/date/lib/parse_date.re"
#line 1498 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6621,7 +6624,7 @@ yy364:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 6625 "ext/date/lib/parse_date.c"
#line 6628 "ext/date/lib/parse_date.c"
yy365:
YYDEBUG(365, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7259,7 +7262,7 @@ yy392:
}
yy393:
YYDEBUG(393, *YYCURSOR);
#line 1553 "ext/date/lib/parse_date.re"
#line 1556 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7279,7 +7282,7 @@ yy393:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 7283 "ext/date/lib/parse_date.c"
#line 7286 "ext/date/lib/parse_date.c"
yy394:
YYDEBUG(394, *YYCURSOR);
yyaccept = 5;
@@ -9029,7 +9032,7 @@ yy454:
++YYCURSOR;
yy455:
YYDEBUG(455, *YYCURSOR);
#line 1256 "ext/date/lib/parse_date.re"
#line 1259 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -9040,7 +9043,7 @@ yy455:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 9044 "ext/date/lib/parse_date.c"
#line 9047 "ext/date/lib/parse_date.c"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 0;
@@ -9600,7 +9603,7 @@ yy475:
}
yy476:
YYDEBUG(476, *YYCURSOR);
#line 1393 "ext/date/lib/parse_date.re"
#line 1396 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9611,7 +9614,7 @@ yy476:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 9615 "ext/date/lib/parse_date.c"
#line 9618 "ext/date/lib/parse_date.c"
yy477:
YYDEBUG(477, *YYCURSOR);
yyaccept = 10;
@@ -9752,7 +9755,7 @@ yy488:
YYDEBUG(488, *YYCURSOR);
++YYCURSOR;
YYDEBUG(489, *YYCURSOR);
#line 1111 "ext/date/lib/parse_date.re"
#line 1114 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9768,7 +9771,7 @@ yy488:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 9772 "ext/date/lib/parse_date.c"
#line 9775 "ext/date/lib/parse_date.c"
yy490:
YYDEBUG(490, *YYCURSOR);
yyaccept = 11;
@@ -9781,7 +9784,7 @@ yy490:
}
yy491:
YYDEBUG(491, *YYCURSOR);
#line 1148 "ext/date/lib/parse_date.re"
#line 1151 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9806,7 +9809,7 @@ yy491:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9810 "ext/date/lib/parse_date.c"
#line 9813 "ext/date/lib/parse_date.c"
yy492:
YYDEBUG(492, *YYCURSOR);
yyaccept = 11;
@@ -10116,7 +10119,7 @@ yy523:
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
YYDEBUG(524, *YYCURSOR);
#line 1128 "ext/date/lib/parse_date.re"
#line 1131 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10135,7 +10138,7 @@ yy523:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 10139 "ext/date/lib/parse_date.c"
#line 10142 "ext/date/lib/parse_date.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yyaccept = 11;
@@ -10241,7 +10244,7 @@ yy534:
if (yych <= '9') goto yy541;
yy535:
YYDEBUG(535, *YYCURSOR);
#line 1310 "ext/date/lib/parse_date.re"
#line 1313 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -10255,7 +10258,7 @@ yy535:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 10259 "ext/date/lib/parse_date.c"
#line 10262 "ext/date/lib/parse_date.c"
yy536:
YYDEBUG(536, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10992,7 +10995,7 @@ yy605:
YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
YYDEBUG(607, *YYCURSOR);
#line 1325 "ext/date/lib/parse_date.re"
#line 1328 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -11003,7 +11006,7 @@ yy605:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11007 "ext/date/lib/parse_date.c"
#line 11010 "ext/date/lib/parse_date.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yyaccept = 11;
@@ -11039,7 +11042,7 @@ yy611:
if (yych <= '9') goto yy605;
yy612:
YYDEBUG(612, *YYCURSOR);
#line 1337 "ext/date/lib/parse_date.re"
#line 1340 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -11052,7 +11055,7 @@ yy612:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11056 "ext/date/lib/parse_date.c"
#line 11059 "ext/date/lib/parse_date.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yyaccept = 11;
@@ -11693,7 +11696,7 @@ yy656:
}
yy657:
YYDEBUG(657, *YYCURSOR);
#line 1296 "ext/date/lib/parse_date.re"
#line 1299 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11706,7 +11709,7 @@ yy657:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11710 "ext/date/lib/parse_date.c"
#line 11713 "ext/date/lib/parse_date.c"
yy658:
YYDEBUG(658, *YYCURSOR);
yyaccept = 13;
@@ -11812,7 +11815,7 @@ yy666:
}
yy667:
YYDEBUG(667, *YYCURSOR);
#line 1240 "ext/date/lib/parse_date.re"
#line 1243 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11827,7 +11830,7 @@ yy667:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 11831 "ext/date/lib/parse_date.c"
#line 11834 "ext/date/lib/parse_date.c"
yy668:
YYDEBUG(668, *YYCURSOR);
yyaccept = 14;
@@ -12060,7 +12063,7 @@ yy700:
if (yych <= ':') goto yy704;
yy701:
YYDEBUG(701, *YYCURSOR);
#line 1523 "ext/date/lib/parse_date.re"
#line 1526 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12080,7 +12083,7 @@ yy701:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12084 "ext/date/lib/parse_date.c"
#line 12087 "ext/date/lib/parse_date.c"
yy702:
YYDEBUG(702, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12632,7 +12635,7 @@ yy763:
}
yy764:
YYDEBUG(764, *YYCURSOR);
#line 1268 "ext/date/lib/parse_date.re"
#line 1271 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -12645,7 +12648,7 @@ yy764:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 12649 "ext/date/lib/parse_date.c"
#line 12652 "ext/date/lib/parse_date.c"
yy765:
YYDEBUG(765, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12684,7 +12687,7 @@ yy771:
YYDEBUG(771, *YYCURSOR);
++YYCURSOR;
YYDEBUG(772, *YYCURSOR);
#line 1509 "ext/date/lib/parse_date.re"
#line 1512 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -12697,7 +12700,7 @@ yy771:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 12701 "ext/date/lib/parse_date.c"
#line 12704 "ext/date/lib/parse_date.c"
yy773:
YYDEBUG(773, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12835,7 +12838,7 @@ yy783:
}
yy784:
YYDEBUG(784, *YYCURSOR);
#line 1544 "ext/date/lib/parse_date.re"
#line 1547 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12843,7 +12846,7 @@ yy784:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12847 "ext/date/lib/parse_date.c"
#line 12850 "ext/date/lib/parse_date.c"
yy785:
YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12994,7 +12997,7 @@ yy793:
}
yy794:
YYDEBUG(794, *YYCURSOR);
#line 1365 "ext/date/lib/parse_date.re"
#line 1368 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -13007,7 +13010,7 @@ yy794:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 13011 "ext/date/lib/parse_date.c"
#line 13014 "ext/date/lib/parse_date.c"
yy795:
YYDEBUG(795, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13222,7 +13225,7 @@ yy814:
if (yych <= '7') goto yy817;
yy815:
YYDEBUG(815, *YYCURSOR);
#line 1476 "ext/date/lib/parse_date.re"
#line 1479 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13240,7 +13243,7 @@ yy815:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13244 "ext/date/lib/parse_date.c"
#line 13247 "ext/date/lib/parse_date.c"
yy816:
YYDEBUG(816, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13250,7 +13253,7 @@ yy817:
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(818, *YYCURSOR);
#line 1457 "ext/date/lib/parse_date.re"
#line 1460 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13268,7 +13271,7 @@ yy817:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13272 "ext/date/lib/parse_date.c"
#line 13275 "ext/date/lib/parse_date.c"
yy819:
YYDEBUG(819, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13332,7 +13335,7 @@ yy821:
}
yy822:
YYDEBUG(822, *YYCURSOR);
#line 1443 "ext/date/lib/parse_date.re"
#line 1446 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -13345,7 +13348,7 @@ yy822:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 13349 "ext/date/lib/parse_date.c"
#line 13352 "ext/date/lib/parse_date.c"
yy823:
YYDEBUG(823, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13448,7 +13451,7 @@ yy842:
++YYCURSOR;
yy843:
YYDEBUG(843, *YYCURSOR);
#line 1417 "ext/date/lib/parse_date.re"
#line 1420 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13473,7 +13476,7 @@ yy843:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 13477 "ext/date/lib/parse_date.c"
#line 13480 "ext/date/lib/parse_date.c"
yy844:
YYDEBUG(844, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13735,7 +13738,7 @@ yy848:
}
yy849:
YYDEBUG(849, *YYCURSOR);
#line 1405 "ext/date/lib/parse_date.re"
#line 1408 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13746,7 +13749,7 @@ yy849:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 13750 "ext/date/lib/parse_date.c"
#line 13753 "ext/date/lib/parse_date.c"
yy850:
YYDEBUG(850, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14666,7 +14669,7 @@ yy973:
if (yych <= '9') goto yy996;
yy974:
YYDEBUG(974, *YYCURSOR);
#line 1282 "ext/date/lib/parse_date.re"
#line 1285 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -14679,7 +14682,7 @@ yy974:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 14683 "ext/date/lib/parse_date.c"
#line 14686 "ext/date/lib/parse_date.c"
yy975:
YYDEBUG(975, *YYCURSOR);
yyaccept = 22;
@@ -15688,7 +15691,7 @@ yy1066:
}
yy1068:
YYDEBUG(1068, *YYCURSOR);
#line 1174 "ext/date/lib/parse_date.re"
#line 1177 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15710,7 +15713,7 @@ yy1068:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 15714 "ext/date/lib/parse_date.c"
#line 15717 "ext/date/lib/parse_date.c"
yy1069:
YYDEBUG(1069, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15802,7 +15805,7 @@ yy1075:
}
yy1076:
YYDEBUG(1076, *YYCURSOR);
#line 1220 "ext/date/lib/parse_date.re"
#line 1223 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15821,7 +15824,7 @@ yy1076:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 15825 "ext/date/lib/parse_date.c"
#line 15828 "ext/date/lib/parse_date.c"
yy1077:
YYDEBUG(1077, *YYCURSOR);
yyaccept = 25;
@@ -16719,7 +16722,7 @@ yy1117:
}
yy1118:
YYDEBUG(1118, *YYCURSOR);
#line 1616 "ext/date/lib/parse_date.re"
#line 1619 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16735,7 +16738,7 @@ yy1118:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16739 "ext/date/lib/parse_date.c"
#line 16742 "ext/date/lib/parse_date.c"
yy1119:
YYDEBUG(1119, *YYCURSOR);
++YYCURSOR;
@@ -16786,7 +16789,7 @@ yy1126:
YYDEBUG(1126, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1127, *YYCURSOR);
#line 1089 "ext/date/lib/parse_date.re"
#line 1092 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16807,7 +16810,7 @@ yy1126:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
#line 16811 "ext/date/lib/parse_date.c"
#line 16814 "ext/date/lib/parse_date.c"
yy1128:
YYDEBUG(1128, *YYCURSOR);
yyaccept = 26;
@@ -16915,7 +16918,7 @@ yy1141:
}
yy1142:
YYDEBUG(1142, *YYCURSOR);
#line 1592 "ext/date/lib/parse_date.re"
#line 1595 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16938,7 +16941,7 @@ yy1142:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16942 "ext/date/lib/parse_date.c"
#line 16945 "ext/date/lib/parse_date.c"
yy1143:
YYDEBUG(1143, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19615,7 +19618,7 @@ yy1294:
goto yy1298;
yy1295:
YYDEBUG(1295, *YYCURSOR);
#line 1066 "ext/date/lib/parse_date.re"
#line 1069 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19637,7 +19640,7 @@ yy1295:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 19641 "ext/date/lib/parse_date.c"
#line 19644 "ext/date/lib/parse_date.c"
yy1296:
YYDEBUG(1296, *YYCURSOR);
yyaccept = 28;
@@ -21328,7 +21331,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
#line 1023 "ext/date/lib/parse_date.re"
#line 1026 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21353,7 +21356,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21357 "ext/date/lib/parse_date.c"
#line 21360 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21789,7 +21792,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
#line 1011 "ext/date/lib/parse_date.re"
#line 1014 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21800,7 +21803,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21804 "ext/date/lib/parse_date.c"
#line 21807 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21835,7 +21838,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
#line 1001 "ext/date/lib/parse_date.re"
#line 1004 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21844,7 +21847,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21848 "ext/date/lib/parse_date.c"
#line 21851 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23856,7 +23859,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
#line 980 "ext/date/lib/parse_date.re"
#line 983 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23864,7 +23867,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 23868 "ext/date/lib/parse_date.c"
#line 23871 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -24003,7 +24006,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
#line 989 "ext/date/lib/parse_date.re"
#line 992 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -24014,7 +24017,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24018 "ext/date/lib/parse_date.c"
#line 24021 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24547,7 +24550,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
#line 968 "ext/date/lib/parse_date.re"
#line 971 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24558,7 +24561,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24562 "ext/date/lib/parse_date.c"
#line 24565 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24731,7 +24734,7 @@ yy1537:
goto yy1531;
}
}
#line 1742 "ext/date/lib/parse_date.re"
#line 1745 "ext/date/lib/parse_date.re"
}
@@ -25090,7 +25093,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '\\': /* escaped char */
++fptr;
if(!fptr[1]) {
add_pbf_error(s, "Escaped character expected", string, begin);
break;
}
fptr++;
if (*ptr == *fptr) {
++ptr;
} else {
+9 -2
View File
@@ -399,9 +399,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
{
timelib_sll retval = 0;
while (!strchr("AaPp", **ptr)) {
while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
if(!**ptr) {
return TIMELIB_UNSET;
}
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;
@@ -2097,7 +2100,11 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '\\': /* escaped char */
++fptr;
if(!fptr[1]) {
add_pbf_error(s, "Escaped character expected", string, begin);
break;
}
fptr++;
if (*ptr == *fptr) {
++ptr;
} else {
+618 -582
View File
File diff suppressed because it is too large. Load diff
+38
View File
@@ -0,0 +1,38 @@
--TEST--
Bug #67251 (date_parse_from_format out-of-bounds read)
--INI--
date.timezone=Europe/Berlin
--FILE--
<?php
var_dump(date_parse_from_format("\\","AAAABBBB"));
--EXPECT--
array(12) {
["year"]=>
bool(false)
["month"]=>
bool(false)
["day"]=>
bool(false)
["hour"]=>
bool(false)
["minute"]=>
bool(false)
["second"]=>
bool(false)
["fraction"]=>
bool(false)
["warning_count"]=>
int(0)
["warnings"]=>
array(0) {
}
["error_count"]=>
int(2)
["errors"]=>
array(1) {
[0]=>
string(13) "Trailing data"
}
["is_localtime"]=>
bool(false)
}
+44
View File
@@ -0,0 +1,44 @@
--TEST--
Bug #67253 (timelib_meridian_with_check out-of-bounds read)
--INI--
date.timezone=Europe/Berlin
--FILE--
<?php
$z = '';
var_dump(date_parse_from_format("aHa0", "0=G{$z}9UCNnF"));
--EXPECT--
array(12) {
["year"]=>
bool(false)
["month"]=>
bool(false)
["day"]=>
bool(false)
["hour"]=>
int(0)
["minute"]=>
int(0)
["second"]=>
int(0)
["fraction"]=>
bool(false)
["warning_count"]=>
int(0)
["warnings"]=>
array(0) {
}
["error_count"]=>
int(3)
["errors"]=>
array(3) {
[0]=>
string(51) "Meridian can only come after an hour has been found"
[1]=>
string(29) "A meridian could not be found"
[9]=>
string(12) "Data missing"
}
["is_localtime"]=>
bool(false)
}
+1 -1
View File
@@ -288,7 +288,7 @@ To use your new extension, you will have to execute the following steps:
3. $ ./buildconf
4. $ ./configure --[with|enable]-$extname
5. $ make
6. $ ./php -f ext/$extname/$extname.php
6. $ ./sapi/cli/php -f ext/$extname/$extname.php
7. $ vi ext/$extname/$extname.c
8. $ make
+6 -2
View File
@@ -5268,7 +5268,7 @@ PHP_FUNCTION(imageaffinematrixget)
{
double affine[6];
long type;
zval *options;
zval *options = NULL;
zval **tmp;
int res = GD_FALSE, i;
@@ -5280,7 +5280,7 @@ PHP_FUNCTION(imageaffinematrixget)
case GD_AFFINE_TRANSLATE:
case GD_AFFINE_SCALE: {
double x, y;
if (Z_TYPE_P(options) != IS_ARRAY) {
if (!options || Z_TYPE_P(options) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array expected as options");
RETURN_FALSE;
}
@@ -5327,6 +5327,10 @@ PHP_FUNCTION(imageaffinematrixget)
case GD_AFFINE_SHEAR_VERTICAL: {
double angle;
if (!options) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number is expected as option");
RETURN_FALSE;
}
convert_to_double_ex(&options);
angle = Z_DVAL_P(options);
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #67248 (imageaffinematrixget missing check of parameters)
--SKIPIF--
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available')}
if(!function_exists('imageaffinematrixget')) die('skip imageaffinematrixget() not available');
?>
--FILE--
<?php
for($i=0;$i<7;$i++) {
imageaffinematrixget($i);
}
?>
--EXPECTF--
Warning: imageaffinematrixget(): Array expected as options in %s on line %d
Warning: imageaffinematrixget(): Array expected as options in %s on line %d
Warning: imageaffinematrixget(): Number is expected as option in %s on line %d
Warning: imageaffinematrixget(): Number is expected as option in %s on line %d
Warning: imageaffinematrixget(): Number is expected as option in %s on line %d
Warning: imageaffinematrixget(): Invalid type for element 5 in %s on line %d
Warning: imageaffinematrixget(): Invalid type for element 6 in %s on line %d
+1 -1
View File
@@ -3623,7 +3623,7 @@ for (;;)
break;
case OP_MINUPTO:
*code += OP_MINUPTO - OP_UPTO;
*code += OP_POSUPTO - OP_MINUPTO;
break;
}
}
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Bug #67238 Ungreedy and min/max quantifier bug in PCRE 8.34 upstream
--FILE--
<?php
echo preg_match('/a{1,3}b/U', 'ab');
?>
--EXPECTF--
1
+1 -1
View File
@@ -1477,7 +1477,7 @@ static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{
}
close_fp = 0;
opened = (char *) estrndup(str, sizeof("[stream]") + 1);
opened = (char *) estrndup(str, sizeof("[stream]") - 1);
goto after_open_fp;
case IS_OBJECT:
if (instanceof_function(Z_OBJCE_PP(value), spl_ce_SplFileInfo TSRMLS_CC)) {
+1
View File
@@ -2,6 +2,7 @@
setting hash_function to sha512 and hash_bits_per_character > 4 should not crash
--SKIPIF--
<?php include('skipif.inc'); ?>
<?php if (!extension_loaded('hash')) die('skip hash extension not available'); ?>
--INI--
session.use_cookies=0
session.cache_limiter=
@@ -3,6 +3,7 @@ Test session_set_save_handler() : incomplete implementation
--INI--
session.save_handler=files
session.name=PHPSESSID
session.gc_probability=0
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
@@ -3,6 +3,7 @@ Test session_set_save_handler() : incorrect arguments for existing handler open
--INI--
session.save_handler=files
session.name=PHPSESSID
session.gc_probability=0
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
+9 -3
View File
@@ -1269,6 +1269,9 @@ SXE_METHOD(xpath)
}
if (!sxe->node) {
php_libxml_increment_node_ptr((php_libxml_node_object *)sxe, xmlDocGetRootElement((xmlDocPtr) sxe->document->ptr), NULL TSRMLS_CC);
if (!sxe->node) {
RETURN_FALSE;
}
}
nodeptr = php_sxe_get_first_node(sxe, sxe->node->node TSRMLS_CC);
@@ -1533,15 +1536,18 @@ SXE_METHOD(getDocNamespaces)
return;
}
array_init(return_value);
sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
if(from_root){
node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr);
}else{
GET_NODE(sxe, node);
}
if (node == NULL) {
RETURN_FALSE;
}
array_init(return_value);
sxe_add_registered_namespaces(sxe, node, recursive, return_value TSRMLS_CC);
}
/* }}} */
@@ -0,0 +1,9 @@
--TEST--
Testing getDocNamespaces() with invalid XML
--FILE--
<?php
$xml = @new SimpleXMLElement("X",1);
var_dump($xml->getDocNamespaces());
?>
--EXPECTF--
bool(false)
@@ -0,0 +1,8 @@
--TEST--
Testing xpath() with invalid XML
--FILE--
<?php
$xml = @simplexml_load_string("XXXXXXX^",$x,0x6000000000000001);
var_dump($xml->xpath("BBBB"));
--EXPECT--
bool(false)
+1 -1
View File
@@ -116,7 +116,7 @@ static void spl_fixedarray_resize(spl_fixedarray *array, long size TSRMLS_DC) /*
array->elements = NULL;
}
} else if (size > array->size) {
array->elements = erealloc(array->elements, sizeof(zval *) * size);
array->elements = safe_erealloc(array->elements, size, sizeof(zval *), 0);
memset(array->elements + array->size, '\0', sizeof(zval *) * (size - array->size));
} else { /* size < array->size */
long i;
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #67247 (spl_fixedarray_resize integer overflow)
--FILE--
<?php
$ar = new SplFixedArray(1);
echo "size: ".$ar->getSize()."\n";
$ar->setSize((PHP_INT_SIZE==8)?0x2000000000000001:0x40000001);
echo "size: ".$ar->getSize()."\n";
?>
--EXPECTF--
size: 1
Fatal error: Possible integer overflow in memory allocation (%d * %d + 0) in %s on line %d
+3
View File
@@ -329,6 +329,9 @@ PHP_FUNCTION(iptcparse)
recnum = buffer[ inx++ ];
if (buffer[ inx ] & (unsigned char) 0x80) { /* long tag */
if((inx+6) >= str_len) {
break;
}
len = (((long) buffer[ inx + 2 ]) << 24) + (((long) buffer[ inx + 3 ]) << 16) +
(((long) buffer[ inx + 4 ]) << 8) + (((long) buffer[ inx + 5 ]));
inx += 6;
+8
View File
@@ -0,0 +1,8 @@
--TEST--
Bug #67250 (iptcparse out-of-bounds read)
--FILE--
<?php
var_dump(iptcparse("\x1C\x02_\x80___"));
?>
--EXPECT--
bool(false)
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #67252 (convert_uudecode out-of-bounds read)
--FILE--
<?php
$a = "M86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A86%A"."\n"."a.";
var_dump(convert_uudecode($a));
?>
--EXPECTF--
Warning: convert_uudecode(): The given parameter is not a valid uuencoded string in %s on line %d
bool(false)
+3
View File
@@ -151,6 +151,9 @@ PHPAPI int php_uudecode(char *src, int src_len, char **dest) /* {{{ */
}
while (s < ee) {
if(s+4 > e) {
goto err;
}
*p++ = PHP_UU_DEC(*s) << 2 | PHP_UU_DEC(*(s + 1)) >> 4;
*p++ = PHP_UU_DEC(*(s + 1)) << 4 | PHP_UU_DEC(*(s + 2)) >> 2;
*p++ = PHP_UU_DEC(*(s + 2)) << 6 | PHP_UU_DEC(*(s + 3));
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 5
#define PHP_RELEASE_VERSION 13
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "5.5.13-dev"
#define PHP_EXTRA_VERSION "RC1"
#define PHP_VERSION "5.5.13RC1"
#define PHP_VERSION_ID 50513
+1 -1
View File
@@ -9,7 +9,7 @@ if [[ "$ENABLE_DEBUG" == 1 ]]; then
else
DEBUG="";
fi
./buildconf
./buildconf --force
./configure --quiet \
$DEBUG \
$TS \