Commit Graph

26415 Commits

Author SHA1 Message Date
Xinchen Hui
683b4f7a2b merge 9eb5cb6571 to 5.3 2012-07-21 00:46:32 +08:00
Derick Rethans
d621a91a50 - Updated to version 2012.4 (2012d) 2012-07-20 10:07:23 +01:00
Anatoliy Belsky
bd39495332 Fix for bug #62379 was missing in 5.3 2012-07-17 17:50:05 +02:00
Jille Timmermans
86b4252c8e Typofix in test-description 2012-07-14 22:07:50 -07:00
Felipe Pena
864575251a - Fixed memory leak when extending DOMXPath 2012-07-14 13:13:31 -03:00
Anatoliy Belsky
02b8362ec2 Fixed bug #61677 ext\zlib\tests\bug_52944.phpt fails
The test is known to fail on windows with zlib version < 1.2.7 (current dep is 1.2.5),
with 1.2.7 it works. As it's primarily a zlib 1.2.5 issue on windows, skip it for now.
2012-07-13 11:39:57 +02:00
Anatoliy Belsky
ad7eeba3c1 reverted changes for #62477 2012-07-12 10:54:14 +02:00
Anatoliy Belsky
b383ddf1e5 Fixed bug #62477 LimitIterator int overflow 2012-07-11 22:25:31 +02:00
Xinchen Hui
bcf5853eaa Fixed Bug #62500 (Segfault in DateInterval class when extended) 2012-07-10 18:43:11 +08:00
Xinchen Hui
c819cf9d6b Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
this bc break is caused by the fix for #61948
2012-07-09 08:32:40 +08:00
Nikita Popov
157ddd9577 Fix potential integer overflow in nl2br
The buffer size was calculated manually, thus creating integer overflows
for very large inputs, e.g. nl2br(str_repeat("\n", 613566757)).

The code now uses safe_emalloc, thus making the code throw an error
instead of crashing.
2012-07-05 20:41:54 +02:00
Nikita Popov
88f46b162b Fix potential integer overflow in bin2hex
The code was already using safe_emalloc but did the multiplication in
the first argument, thus making the use of safe_emalloc pretty useless.

The *2 is now moved to the second argument.
2012-07-05 20:14:49 +02:00
johannes
bcc87ba68e Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially
not if they aren't in 5.4, too.
2012-07-05 00:55:47 +02:00
Nikita Popov
250393f925 Revert JSON changes to PHP 5.3
This reverts the following commits:

974324676b
4662151ea7
84fe2cc890

This does not revert the JSON changes released in PHP 5.3.14.
2012-07-01 16:28:57 +02:00
andrey
8fe87e7fea fix Bug #62273 Segmentation Fault in Mysqli/Mysqlnd 2012-06-29 14:42:36 +03:00
andrey
1ac611f24f Merge branch 'PHP-5.3' of ssh://git.php.net/php-src into PHP-5.3 2012-06-29 14:40:41 +03:00
Nikita Popov
e6cf7d7745 Fix some lengths in crypt()
Use salt_len_in instead of strlen(salt) or PHP_MAX_SALT_LEN, otherwise too
much memory will be allocated.

sha512 has a 86 character checksum, not 43. That probably was a copy&paste
from the sha256 code which indeed has 43.

The allocation also was using sizeof(char *), thus allocating 4 or 8 times
as much memory as necessary. The sizeof(char *) was removed in the 5.4
branch in b7a92c9 but forgotten on 5.3.

The memset 0 call was using PHP_MAX_SALT_LEN which can be smaller than the
output buffer and thus not zeroing out everything. Use the size of the
output buffer (needed) instead.
2012-06-29 13:11:43 +02:00
andrey
f826ea093f new charsets 2012-06-29 12:42:54 +03:00
Anthony Ferrara
7e8276ca68 Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
Fixed a memory allocation bug in crypt() SHA256/512 that can
cause segmentation faults when passed in salts with a null byte
early.
2012-06-28 20:00:03 -04:00
Nikita Popov
974324676b Add json_last_error_msg() function
This replaces json_last_error(true) and is consistent with other custom
error handling functions.
2012-06-28 20:11:27 +02:00
Johannes Schlüter
b025b9d0cf Fix #62432 ReflectionMethod random corrupt memory on high concurrent
This fixes the same issue in multiple extensions. This isn't needed
in later branches as 5.4 introduced object_properties_init()
2012-06-27 23:26:33 +02:00
Nikita Popov
4662151ea7 Improve JSON error handling
json_encode() no longer throws warnings. Instead only the error code for
json_last_error() is set.

As it is hard to debug the error from just an error code an optional
$as_string parameter was added to json_last_error(), which returns an
error message instead of an error code.
2012-06-27 12:21:48 +02:00
Moriyoshi Koizumi
e427182279 Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:13:23 +09:00
Nikita Popov
5b3f4d25ea Fix memory allocation checks for base64 encode
base64_encode used safe_emalloc, but one of the arguments was derived from a
multiplication, thus making the allocation unsafe again.

There was a size check in place, but it was off by a factor of two as it
didn't account for the signedness of the integer type.

The unsafe allocation is not exploitable, but still causes funny behavior
when the sized overflows into a negative number.

To fix the issue the *4 factor is moved into the size argument (where it is
known to be safe), so safe_emalloc can carry out the multiplication.

The size check is removed as it doesn't really make sense once safe_emalloc
works correctly. (Would only cause base64_encode to silently return false
instead of throwing an error. Also could cause problems with other uses of
the base64 encoding API, which all don't check for a NULL return value.)

Furthermore the (length + 2) < 0 check is replaced with just length < 0.
Allowing lengths -2 and -1 doesn't make sense semantically and also is not
honored in the following code (negative length would access unallocated
memory.)

Actually the length < 0 check doesn't make sense altogether, but I left it
there just to be safe.
2012-06-24 23:32:50 +02:00
Nikita Popov
84fe2cc890 Improve json_encode error handling
json_encode() now returns bool(false) for all possible errors, throws the
respective warning and also sets the respective json_last_error() error
code. Three new error codes have been added:

  * JSON_ERROR_RECURSION
  * JSON_ERROR_INF_OR_NAN
  * JSON_ERROR_UNSUPPORTED_TYPE

To get a partial JSON output instead of bool(false) the option
JSON_PARTIAL_OUTPUT_ON_ERROR can be specified. In this case the invalid
segments will be replaced either by null (for recursion, unsupported type
and invalid JSON) or 0 (for Inf and NaN).

The warning for invalid UTF-8 stays intact and is thrown also with
display_errors = On. If this behavior is undesired this can be remedied
later.
2012-06-23 20:51:52 +02:00
Felipe Pena
c3f34796a0 - Improved fix for #62384 2012-06-23 15:10:47 -03:00
Johannes Schlüter
a62d4e2c43 Remove extra ; 2012-06-22 17:32:46 +02:00
Felipe Pena
b8e946b02e - Fixed bug #62384 (Attempting to invoke a Closure more than once causes segfaul) 2012-06-22 12:05:29 -03:00
Johannes Schlüter
055ecbc628 Improve check for :memory: pseudo-filename in SQlite 2012-06-22 12:48:39 +02:00
Johannes Schlüter
d93892de7a Remove outdated and user-specific files 2012-06-20 19:46:32 +02:00
Nikita Popov
fed1f2d124 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:32:44 +02:00
Anatoliy Belsky
e793539678 sync zip ext version with pecl 2012-06-19 17:15:56 +02:00
Anatoliy Belsky
a8948d0808 split gzgetc_basic.phpt for zlib 1.2.7 2012-06-19 14:08:34 +02:00
Anatoliy Belsky
d3780f1f90 Reverted the BC fix regarding to #57905, test adopted
New 0.10.1 has a stronger archive integrity check. Restoring
the old behaviour of libzip < 0.10.1 makes no sense at this
place.
2012-06-17 16:04:36 +02:00
michelangelo
cda14b995c Adding a test for ext/posix/tests/posix_getegid_basic.phpt 2012-06-10 17:07:49 +04:00
Anatoliy Belsky
baacc2cb13 set current versions for libzip and zip ext 2012-06-07 22:32:03 +02:00
Anatoliy Belsky
bde0e8c2a1 zip windows fixes 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
8ca457f64d fixed bc break related to #57905 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
e883892664 fixed a bit overlooked from the last libzip port 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
b8cdc731b8 brought the fix for #47667 back 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
a37e84e549 fixed zip entry freeing 2012-06-07 21:01:32 +02:00
Anatoliy Belsky
f4a44f18b8 rechecked the merged libzip, took also the indents from the original to
avoid confusion next time
2012-06-07 21:01:31 +02:00
Anatoliy Belsky
a39bcfc5ee fixed a double freeing crash 2012-06-07 21:01:31 +02:00
Anatoliy Belsky
9a2365412e fixed header include 2012-06-07 21:01:31 +02:00
Anatoliy Belsky
335a11b14b initial libzip upgrade patch to 0.10.1 2012-06-07 21:01:31 +02:00
Felipe Pena
018a9b321f Merge commit '15213768e6cc098ab4e53cacc3b5eb86fa85284a' into PHP-5.3 2012-06-07 14:18:34 -03:00
Pierrick Charron
fed5923dbc Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
Modify the scanner to check if the first char of the raw data is an opening " in which case we
need to find the closing one. Otherwise just search for the next end of value char [\r\n;\000]
2012-06-07 17:44:20 +02:00
Gustavo André dos Santos Lopes
c1ac325228 Fix ext/intl build on ICU < 4.8 2012-06-06 12:10:00 +02:00
Gustavo André dos Santos Lopes
52d541a314 Optimization in ext/intl/msgformat
Don't transform the string to make it apostrophe friendly in ICU 4.8+
as that it is now the default.
2012-06-06 11:36:00 +02:00
Gustavo André dos Santos Lopes
45b3fa4dee Fixed tests in ext/intl
21 is not a valid value for UNUM_PADDING_POSITION. Changed the test to
use 2 instead.

Remove ICU 4.2- test. No one cares.
2012-06-05 16:47:00 +02:00
Felipe Pena
15213768e6 - Fixed bug #62227 (Invalid phar stream path causes crash) 2012-06-04 20:07:14 -03:00
Gustavo André dos Santos Lopes
9b233b7e5e Changed XFAILed collator_get_sort_key.phpt
Ressurected and limited to ICU 4.8 in the hope that the sort keys
will remain stable in more recent ICU versions. I have only tested
with ICU 4.8 so far.
2012-06-04 10:18:24 +02:00
Felipe Pena
4fc49c04df Merge commit 'e59b6dc0ae803d49c3f620818285f98dfb61fd57' into PHP-5.3 2012-06-03 19:00:49 -03:00
Felipe Pena
e59b6dc0ae - Fixed information leak in ext exif (discovered by Martin Noga, Matthew "j00ru" Jurczyk, Gynvael Coldwind) 2012-06-03 15:23:07 -03:00
Xinchen Hui
1f5327a602 Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant) 2012-06-01 14:57:27 +08:00
Stanislav Malyshev
fa05f038cb fix unchecked emalloc
(cherry picked from commit 158d8a6b08)
2012-05-30 21:37:28 +02:00
Jille Timmermans
a331f43f8c Typofix in comment in proc_open.c 2012-05-30 14:42:39 +08:00
Stanislav Malyshev
aab49e934d fix CVE-2012-2143 2012-05-29 23:07:04 -07:00
Anatoliy Belsky
8d5e953a19 updated the libmagic patch after Felipes regex fix 2012-05-29 17:38:30 +02:00
Matt Ficken
ad0371ac7e Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt 2012-05-29 16:38:57 +02:00
Matt Ficken
b4b0aaae93 Bug #62177 deactivate the linux test version on win 2012-05-29 16:37:19 +02:00
Matt Ficken
dbc727373c Fix bug #62177 Test Bug - finfo_file_regex.phpt 2012-05-29 16:31:47 +02:00
Matt Ficken
86d2fafded Fixed bug #62149 Test Bug - ext/curl/tests/bug61948 2012-05-25 10:44:59 +02:00
Matt Ficken
4aac4da673 Fixed bug #62148 mail_skipif doesn't skip imap tests on Release Build 2012-05-25 10:34:33 +02:00
Matt Ficken
d4d36fba28 Fixed bug #62147 test bug - popen_pclose_basic-win32 2012-05-25 09:53:51 +02:00
Johannes Schlüter
8fc9df3f67 Fix bug #62146 com_dotnet cannot be built shared, tested by Anatoliy 2012-05-25 00:22:25 +02:00
Felipe Pena
6c9056ceb7 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2012-05-24 13:45:36 -03:00
Felipe Pena
11b4f3becd - Fixed magic file regex support 2012-05-24 13:42:47 -03:00
Xinchen Hui
bde86a6639 Fixed bug #62073
(Different ways of iterating over an SplMaxHeap result in in different keys)
2012-05-24 23:31:05 +08:00
Gustavo André dos Santos Lopes
85c777d2f1 Fixed bug #55610: ResourceBundle and Traversable 2012-05-24 14:33:05 +02:00
Gustavo André dos Santos Lopes
2da2de46a8 Fixed bug #60785
Memory leak in IntlDateFormatter constructor.

udat_setCalendar() clones the calendar before it adopts it,
so we were leaking the original calendar.

Also we now validate the calendar type.
2012-05-24 11:06:21 +02:00
Gustavo André dos Santos Lopes
e08566c613 Fixed bug #62017
IntlDateFormatter constructor would release some resources
under certain error conditions.
2012-05-23 15:52:19 +02:00
Reeze Xia
9205c4fd62 Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys) 2012-05-23 20:42:06 +08:00
Gustavo André dos Santos Lopes
1eff3b01b8 Fixed bug #6208: memory leak in grapheme_extract() 2012-05-23 13:25:45 +02:00
Gustavo André dos Santos Lopes
86ea921291 Fixed bug #62082
This was a buffer overflow in internal function
get_icu_disp_value_src_php().
2012-05-23 13:25:42 +02:00
Gustavo André dos Santos Lopes
07c0d714a5 Fixed bug #62081
Constructor of IntlDateFormatter would leak if called twice.

Made calling it more than once error out before starting
using resources.
2012-05-23 13:25:37 +02:00
Gustavo André dos Santos Lopes
51286bd8e5 Fixed bug #62070
Collator::getSortKey() was returning an unterminated string
due the length given to RETURN_STRINGL being off by one.
2012-05-23 13:25:32 +02:00
Xinchen Hui
f733173b1f Fix typo while resolving conflicts 2012-05-23 13:43:49 +08:00
Xinchen Hui
a7df6ce664 Revert "Implemented FR #61602 Allow access to name of constant used as default value"
This reverts commit 054f3e3ce5.

See: http://news.php.net/php.cvs/69137 and the author confirmed.
Will commit later after the author fixed this then make a new PR.

Conflicts:

	ext/reflection/php_reflection.c
2012-05-23 13:39:00 +08:00
Matt Ficken
c973fef48d Fix bug #62066 Test Bug - ext/tidy/tests/004.phpt 2012-05-21 12:51:24 +02:00
Matt Ficken
645d65f3e3 Fixed bug #62068 Test bug - gmp_nextprime and 022 2012-05-21 12:31:16 +02:00
zoe slattery
778d69ddfe Fix: 62067 Moved comments to FILE section 2012-05-19 16:33:36 +01:00
Felipe Pena
6d928fd26d - Fixed bug #62064 (memory leak in the XML Writer module) 2012-05-18 19:23:29 -03:00
Johannes Schlüter
67039363cd Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:/php-src:
  Fix for bug#62046
2012-05-16 16:46:08 +02:00
Stanislav Malyshev
6e51989501 fd fix 2012-05-16 16:35:16 +02:00
Stanislav Malyshev
4eb802bb14 fix bug #61065
(cherry picked from commit a10e778bfb)
2012-05-16 16:30:29 +02:00
andrey
d4afbd487a Fix for bug#62046
Bug#62046 mysqli@mysqlnd can't iterate over stored sets after call to
mysqli_stmt_reset().

Stmt's state was changed to STMT_PREPARED and leads the driver to think
that the stmt was just prepared. Because result set exist also for only
prepared but not executed sets, the check for stmt->result isn't any good.
There is a result set, because as response for COM_PREPARE the server sends
metadata and metadata is part of a result set. After COM_EXECUTE the server
sends metadata again, which could be different and in this case more correct.
2012-05-16 14:28:55 +02:00
zoe slattery
1af8b3f883 Change impl of GZIP_POST, DEFLATE_POST. See #62021 2012-05-15 11:05:20 +01:00
Nuno Lopes
950d5ee590 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 13:07:00 -04:00
Anatoliy Belsky
266578f584 Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
Exception text differ on windows
2012-05-10 17:07:38 +02:00
Anatoliy Belsky
f7d8b274c7 Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
What happens here is trivial long overflow. Despite the bug attracted
attention on windows, the same story is on linux. Just wait for a big
anough bucket->key . The linux test had %i to check the key value
which should be %d all the way.
2012-05-10 15:27:44 +02:00
Anatoliy Belsky
7fb16d5bd9 Fix bug 61901 ext\phar\tests\phar_buildfromdirectory2.phpt fails
Another error message is produced by win specific code
2012-05-09 13:02:33 +02:00
Matt Ficken
c12fdbde5f Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
Fixed that again for systems having their %SYSTEMROOT% not in
c:\windows
2012-05-08 19:31:41 +02:00
Anatoliy Belsky
d776a933eb Fix bug 61713 check also that mbstring's found any internal_encoding 2012-05-08 18:31:11 +02:00
Anatoliy Belsky
3a4a25358f Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails
There is a logic error in charset detection part for htmlentities.
When mbstring is compiled shared and mbstring.internal_encoding
is set to pass, it prevents default_charset from being checked
resulting iso-8859-1 being choosed.
2012-05-08 17:42:01 +02:00
Anatoliy Belsky
2068419ae5 Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails 2012-05-07 15:39:07 +02:00
Anatoliy Belsky
ce59121c5f Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails 2012-05-07 15:37:29 +02:00
Xinchen Hui
99076bc24f Change the test folder 2012-05-06 20:31:40 +08:00
Xinchen Hui
7ccd594392 Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference) 2012-05-06 20:01:10 +08:00
Nikita Popov
311ee8f69c Merge branch 'pull-request/76' into PHP-5.3 2012-05-06 12:45:45 +02:00
Reeze Xia
3e9923dd8d Fixed Bug #61961 (file_get_content leaks when access empty file with max length) 2012-05-06 18:27:26 +08:00
Xinchen Hui
035ce937e1 Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) 2012-05-06 00:40:49 +08:00
Anatoliy Belsky
8a10259642 Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails 2012-05-04 11:40:49 +02:00
Anatoliy Belsky
6c12252790 Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt 2012-05-04 11:29:49 +02:00
Anatoliy Belsky
69ed09a31c Fix bug 61902 ext\phar\tests\phar_setsignaturealgo2.phpt falis
openssl needs explicit openssl.cnf on windows
2012-05-02 21:38:32 +02:00
andrey
b42d000471 Fix for bug#61411
Bug #61411 PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE
Wrong allocation, that doesn't follow the scheme of using stmt->persistent
was the root cause of the problem and the crash at free.
2012-05-02 15:55:22 +02:00
Christopher Jones
d14f23365c Make output order for dom007.phpt platform independent
This test has long been near the top of the reported output diffs.
For example, on http://qa.php.net/reports/?version=5.4.0 it has diffed
1307 times out of 3543 reports, at time of this commit.  (The second
highest diff has occurred 710 times.)
2012-05-01 15:43:31 -07:00
Christopher Jones
c864b1ca2f Fix masking in bug61115-1.phpt
The test bug61115-1.phpt was diffing for non-debug builds
2012-05-01 14:32:09 -07:00
Anatoliy Belsky
d26e006d7f Fix bug 61868 ext\dom\tests\DOMDocument_validate_on_parse_variation.phpt fails 2012-04-30 17:23:49 +02:00
Anatoliy Belsky
ec5421d044 Additional fixs for bug 61746 - prepare/clean acls 2012-04-30 14:33:48 +02:00
Anatoliy Belsky
680685127f Fix bug 61870 ext\session\tests\bug42596.phpt fails 2012-04-30 12:06:28 +02:00
Anatoliy Belsky
8249581a2d Fix bug ext\filter\tests\bug52209.phpt fails 2012-04-30 10:25:54 +02:00
Xinchen Hui
a601605f14 merge test from PHP-5.4 2012-04-30 12:33:55 +08:00
Xinchen Hui
d80a3d9668 Revert "Merge branch 'fix-pro_nice-test' of https://github.com/reeze/php-src into PHP-5.3"
After pushed, I found the test script in 5.4 is already fixed this, so
revert this change, and be consistent with 5.4's test

This reverts commit 24d85e4bd8, reversing
changes made to bae56a87f8.
2012-04-30 12:31:33 +08:00
Xinchen Hui
24d85e4bd8 Merge branch 'fix-pro_nice-test' of https://github.com/reeze/php-src into PHP-5.3 2012-04-30 12:29:15 +08:00
Felipe Pena
d44a383986 - Added missing bound check in iptcparse() (path by chris at chiappa.net) 2012-04-29 19:12:12 -03:00
reeze
e52be10b30 Fix test for proc_nice: bsd ps command didn't support option -o "%p %n" 2012-04-30 00:59:54 +08:00
Matt Ficken
dc6d283b1c Fix bug 61685 putenv('TZ=UTC') doesn't update timezone for localtime() 2012-04-28 11:42:42 +02:00
Anatoliy Belsky
4daab0abec Fix bug #61791 ext\sqlite3\tests\sqlite3_15_open_error.phpt fails 2012-04-26 15:14:26 +02:00
Anatoliy Belsky
4e9db5ba9f Fix bug #61800 ext\standard\tests\streams\bug61371.phpt fails 2012-04-26 13:27:01 +02:00
Anatoliy Belsky
433290e199 Partial fix for bug 61743 to get correct icacls path 2012-04-25 18:38:27 +02:00
Anatoliy Belsky
270a406ac9 Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only 2012-04-24 14:05:35 +02:00
Gustavo André dos Santos Lopes
8d748e5de5 Fixed bug #61764: 'I' unpacks n as signed if n > 2^31-1 on LP64
Also fixed possible invalid read on big endian LP64.
2012-04-23 22:09:38 +01:00
Felipe Pena
c8865e3b84 - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice) 2012-04-23 15:18:12 -03:00
Anatoliy Belsky
da1b534601 Fix bug #61811 three of finfo tests failed, see also #61812.
The remaining two was assidentially merged back from 5.4
2012-04-22 19:26:54 +02:00
Xinchen Hui
f13b0ede07 Fixed warning implicit declaration of function 'file_printedlen' 2012-04-22 19:52:07 +08:00
Xinchen Hui
c06e92a533 Fixed bug #61812 (Uninitialised value used in libmagic) 2012-04-22 19:38:14 +08:00
Xinchen Hui
2e9eb5e32f Fix test
Reported by cjones
2012-04-21 16:02:25 +08:00
Stanislav Malyshev
5cbf2d6785 Merge branch 'pull-request/61' into PHP-5.3
* pull-request/61:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:28:30 -07:00
Johannes Schlüter
c06ec6bde4 Commit generated file 2012-04-19 12:47:09 +02:00
Johannes Schlüter
1b78aef426 Fix bug #61755 parsing bug can lead to access violations 2012-04-19 12:46:02 +02:00
Anatoliy Belsky
adfb4c62b7 Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails
The solution was already introduced in 5.4 by Etienne Kneuss and
Pierre but wasn't merged back into 5.3 . SplFileObject should
not be used with directories. So just putting together all the
necessary pieces from 5.4
2012-04-19 11:33:12 +02:00
Sherif Ramadan
2827324c7c Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer 2012-04-19 04:44:43 -04:00
Johannes Schlüter
e946eaca0b Update generated file. 2012-04-18 22:49:03 +02:00
Johannes Schlüter
dda60f3014 Ensure the SQL parser is regenerated after changes. 2012-04-18 22:48:49 +02:00
Anatoliy Belsky
f3d86b314f Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/* 2012-04-16 17:06:30 +02:00
Anatoliy Belsky
bceafee879 Fix bug 61720 ext\libxml\tests\bug61367-read.phpt fails 2012-04-16 15:45:03 +02:00
Anatoliy Belsky
9c8907ec10 Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails 2012-04-16 15:38:46 +02:00
Anatoliy Belsky
1c435ae498 Fix bug 61718 ext\ldap\tests\ldap_set_rebind_proc_error.phpt fails 2012-04-16 15:25:20 +02:00
Anatoliy Belsky
47e7755785 Fix bug 61717 ext\ldap\tests\ldap_sasl_bind_basic.phpt fails 2012-04-16 15:20:03 +02:00
Anatoliy Belsky
163c1a393f Fix bug 61680 ext\zlib\tests\gzencode_variation1-win32.phpt fails 2012-04-16 14:04:29 +02:00
Anatoliy Belsky
c981016e41 Fix bug 61676 ext\tidy\tests\bug54682.phpt fails 2012-04-16 13:38:13 +02:00
Anatoliy Belsky
9a4cb732ed Fix bug 61743 tests in ext\standard\tests\file\windows_acls\* fail 2012-04-16 13:30:58 +02:00
Xinchen Hui
8c4294bcb4 Fixed test faild
the sun_path will not be that much long:
 http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/un.h.html
2012-04-13 00:07:07 +08:00
Adam Harvey
3f3ad30c50 Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
2012-04-11 08:24:38 +08:00
Anatoliy Belsky
ed0ddd20c5 Fixed bug #61669 ext\standard\tests\file\rename_variation7-win32.phpt fails 2012-04-10 15:16:48 +02:00
Anatoliy Belsky
b0cb29db87 Fixed bug #61668 ext\standard\tests\file\rename_variation13-win32.phpt fails 2012-04-10 15:09:21 +02:00
Anatoliy Belsky
b9cbb9e744 Fix bug #61667 ext\standard\tests\file\glob_variation-win32.phpt fails 2012-04-10 15:00:03 +02:00
Anatoliy Belsky
fde96342e8 Fixed bug #61666 ext\standard\tests\file\file_put_contents_variation8-win32.phpt fails 2012-04-10 14:13:15 +02:00
Anatoliy Belsky
b2f2e1d6cc Fix bug #61659 Test ext\spl\tests\bug60082.phpt fails 2012-04-10 14:03:19 +02:00
Anatoliy Belsky
b3be5d920a Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails 2012-04-10 13:58:15 +02:00
Anatoliy Belsky
15e26c6d4a Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt 2012-04-10 13:54:22 +02:00
Anatoliy Belsky
af8646c188 Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt 2012-04-10 13:40:20 +02:00
Anatoliy Belsky
c4676ee99f Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails 2012-04-10 13:08:57 +02:00
Anatoliy Belsky
5594fcf423 Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails 2012-04-10 13:02:53 +02:00
Anatoliy Belsky
37cb29ae90 Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails 2012-04-10 12:57:10 +02:00
Anatoliy Belsky
d80e2e069c Fixed bug 61621 Test fail in ext/standard/tests/dir 2012-04-10 12:47:01 +02:00
Anatoliy Belsky
26dbc5ecb4 Fixed bug #61611 ext\date\tests\date_default_timezone_get-2.phpt fails
The behaviour on windows is to select an arbitrary timezone from the
current system settings. This gives no chance to hardcode the timezone
name, for instance for UTC+1 it could choose from the multiple names
like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made
for windows. Tested on debian and win7 both x86.
2012-04-10 12:33:11 +02:00
Anatoliy Belsky
2ca49d39a3 Fixed bug #61631 mbstring mail related tests fail 2012-04-10 11:47:18 +02:00
Anatoliy Belsky
d89b65f985 Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails
The behaviour on windows is to select an arbitrary timezone from the current system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made for windows.
2012-04-10 11:03:41 +02:00
Anatoliy Belsky
4ff55e646a Fix bug #61609 Test ext\date\tests\bug52062.phpt fails
As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php
this is the generic 32 bit timestamp issue
2012-04-10 10:18:10 +02:00
Gustavo André dos Santos Lopes
0f180a63eb Fixed bug in new stream_get_line() when using NUL as a delimiter.
This is the issue Derick spotted a few days ago..
2012-04-07 16:32:19 +01:00
Matt Ficken
381edb425e Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt 2012-04-04 18:39:24 +02:00
Xinchen Hui
94f1c05ff8 Fixed bug #61617 (Libxml tests failed(ht is already destroyed)) 2012-04-04 17:22:37 +08:00
Gustavo André dos Santos Lopes
ca58cd01fc Cherry-pick 4cc74767
Headers: forbid \r and \n also after \0, allow CRLF followed by HT or SP and forbid \0. See bug #60227.

Conflicts:

	ext/standard/tests/general_functions/bug60227.phpt
	ext/standard/tests/general_functions/bug60227_1.phpt
	ext/standard/tests/general_functions/bug60227_2.phpt
	main/SAPI.c
2012-04-04 09:59:51 +01:00
Xinchen Hui
7b04638c8c Fix test
cherry-pick from php-5.4
2012-04-04 15:20:28 +08:00
Matt Ficken
438536e45e Fix bug #61460 popen_close_error-win32 expected output is wrong 2012-04-03 14:19:43 +02:00
Anatoliy Belsky
14e74aeb57 Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails 2012-04-03 13:23:06 +02:00
Anatoliy Belsky
94cefaedaf Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192 2012-04-03 13:07:51 +02:00
Anatoliy Belsky
469cd3abf1 Fix bug #61517 random test failure - ext/standard/tests/misc/time_sleep_until_basic.phpt 2012-04-03 11:04:52 +02:00
Anatoliy Belsky
8684fb7fac updated the libmagic.patch 2012-04-02 17:27:23 +02:00
Anatoliy Belsky
909713e233 Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails
This patch fixes the failure caused by the
posix lseek and read versions under windows in cdf_read() .
Additionally all the occurences of lseek and read
was replaced by _lseek and _reed for windows.
2012-04-02 17:22:46 +02:00
Anatoliy Belsky
0cdba53aae Fix bug #61565 Fileinfo ext\fileinfo\tests\finfo_file_001.phpt fails 2012-04-02 17:19:09 +02:00
Derick Rethans
0e53ac49e6 - Updated to version 2012.3 (2012c) 2012-04-02 10:40:01 +01:00
Popa Adrian Marius
66b3b44fd5 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2012-04-02 10:02:45 +03:00
Christopher Jones
c56cfbd234 Add php.ini parameter checks for OCI8
Add tests for OCI8 php.ini parameters particularly to check
which parameters can be changes with ini_set().
2012-03-30 16:12:25 -07:00
Popa Adrian Marius
97f4fc22c5 Fix firebird bug #60947 , tested and now it prints the header page information from database 2012-03-29 18:28:01 +03:00
Shein Alexey
c0f806a69c Merge branch 'fix-debug-build-bug61115-1.phpt' into PHP-5.3
* fix-debug-build-bug61115-1.phpt:
  Fixed bug61115-1.phpt for debug build version.
2012-03-29 17:01:40 +05:00
Shein Alexey
e1352b0416 Fixed bug61115-1.phpt for debug build version. 2012-03-29 16:51:45 +05:00
Yasuo Ohgaki
8449e0ca89 Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less) 2012-03-29 20:04:15 +09:00
Johannes Schlüter
21fa9634c1 Merge remote branch 'security/PHP-5.3' into PHP-5.3
* security/PHP-5.3:
  fix bug #61367 - open_basedir bypass using libxml RSHUTDOWN
  open_basedir check for linkinfo
  NEWS entry for readline fix
  Add open_basedir checks to readline_write_history and readline_read_history
2012-03-29 10:54:08 +02:00
Jille Timmermans
710335b2a3 ext/pcntl/pcntl.c: Fix typo in comment
Signed-off-by: Jille Timmermans <jille@quis.cx>
2012-03-29 08:46:04 +01:00
Gustavo André dos Santos Lopes
117cdf384f Revert "ext/pcntl/pcntl.c: Fix typo in comment" (apply correct workflow)
This reverts commit 55b1e61242.
2012-03-29 08:44:19 +01:00
Jille Timmermans
55b1e61242 ext/pcntl/pcntl.c: Fix typo in comment
Signed-off-by: Jille Timmermans <jille@quis.cx>
2012-03-29 09:07:07 +09:00
Anatoliy Belsky
eeab3be303 Fix bug #61459 popen_close_basic-win32 can't run sort.exe 2012-03-28 19:25:29 +02:00
Anatoliy Belsky
bff8152565 Fix bug #61401 ext\openssl\tests\004.phpt fails 2012-03-28 17:11:58 +02:00
Anatoliy Belsky
bd7bb973b1 Fix bug #61404 ext\openssl\tests\021.phpt fails 2012-03-28 16:04:56 +02:00
Anatoliy Belsky
bd928f0592 Fix bug #61448 intl tests fail with icu >= 4.8 2012-03-28 15:07:01 +02:00
Gustavo André dos Santos Lopes
4fa0c2a963 Merge remote branch 'origin/PHP-5.3' into 5.3 2012-03-28 13:12:12 +01:00
Gustavo André dos Santos Lopes
f07dd29fdc Fixed problem introduced in a763929 (fixing bug #61347).
The test added in 8c44c85 should now pass.
2012-03-28 13:04:41 +01:00
Anatoliy Belsky
0b20329aaf Fix bug #61468 ext/phar/tests/phar_oo_005.phpt fails 2012-03-28 12:54:19 +02:00
Anatoliy Belsky
11f04c3524 Bug 61504 updated libmagic.patch 2012-03-28 12:06:09 +02:00
Anatoliy Belsky
e7fa402c7c Bug #61504 TSRML_FETCH() must be last 2012-03-28 12:05:20 +02:00
Gustavo André dos Santos Lopes
067603106e Restored the good part of 74ee335 that was just reverted. 2012-03-28 08:43:41 +01:00
Gustavo André dos Santos Lopes
c6e15455a3 Revert "- fix bug #61504, fix build errors on windows and possibly other"
This reverts commit 74ee335e3a.
2012-03-28 08:41:18 +01:00
Pierre Joye
74ee335e3a - fix bug #61504, fix build errors on windows and possibly other 2012-03-28 01:59:41 +02:00
Christopher Jones
968a330220 Update README
More updates to OCI8 README as an excuse to try the PHP multi-dir git
workflow instructions.
2012-03-27 11:19:33 -07:00
Anatoliy Belsky
da85d5b4a0 Fix bug #61518 skip on windows, fix on linux - ext/standard/tests/streams/bug60106.phpt 2012-03-27 18:49:59 +02:00
Anatoliy Belsky
bcfcfb2fc5 Fix bug #61519 test fails, should pass - ext/zlib/tests/bug60761.phpt 2012-03-27 18:02:31 +02:00
Anatoliy Belsky
b638d3020c Fix bug #61405 ext\openssl\tests\022.phpt fails 2012-03-27 16:07:59 +02:00
Anatoliy Belsky
e55718b091 Fix bug #61412 ext\openssl\tests\bug28382.phpt fails 2012-03-27 16:07:59 +02:00
Shein Alexey
ddac4688e8 Added failing test for ArrayObject::offsetExists(). 2012-03-27 18:59:04 +05:00
Pierre Joye
d0e3289d12 - fix test for 5.11 2012-03-27 14:01:38 +02:00
Pierre Joye
12cf930a40 Fix bug #61504, potential vuln. in fileinfo. update to 5.11 2012-03-27 13:34:46 +02:00
Stanislav Malyshev
167e2fd782 fix bug #61367 - open_basedir bypass using libxml RSHUTDOWN 2012-03-25 12:50:25 -07:00
Stanislav Malyshev
cd9cd36d7e fix bug #61487 - bad bounds check in grapheme_strpos 2012-03-25 00:56:38 -07:00
Rasmus Lerdorf
900778731c open_basedir check for linkinfo 2012-03-25 05:32:21 +05:30
Pierrick Charron
da2da13f93 Remove unused variable 2012-03-24 17:49:58 -04:00
Hannes Magnusson
948d326b29 Fix test on FreeBSD and other systems that have /etc/services 2012-03-24 17:58:40 +01:00
Ilia Alshanetsky
8d0760f38a Revert incorrect fix 2012-03-24 12:27:55 -04:00
Xinchen Hui
56dac369ab Fix ZTS build 2012-03-24 14:22:04 +08:00
Gustavo André dos Santos Lopes
372801d94c Fixed tests that var_dump/print_r DOM objects. 2012-03-23 22:08:33 +00:00
Gustavo André dos Santos Lopes
b61017c9b6 Improved on DOM object debug info handler. Added test. 2012-03-23 21:23:24 +00:00
Joey Smith
d04682766d Added DOM Debug handler 2012-03-23 21:23:23 +00:00
Gustavo André dos Santos Lopes
3960def881 Fixed bug #61482, caused by the fix to bug #61418.
Turns out I'd forgotten to also update the destructor for the iterator
returned by DirectoryIterator.
The iterator for DirectoryIterator maintains the same ->current pointer
throughout its existence (the DirectoryIterator itself) and returns it
(the same object) everytime a value is requested from the iterator.
Moving forward the iterator only changes the object. Previous code
added two references to the object in get_iterator on the account of
1) the iterator memory living in its DirectoryIterator object and
2) the object being stored in iterator->current. This seems to be
unnecessary. Iterators are not responsible for incrementing the refcount
of the values they yield, that's up to the caller (the engine). What
matters for the iterator is that the object exists as long as the
iterator exists and this can be guaranteed by incremented the refcount
only once. Consequently, I only add one reference in get_iterator
(and reclaim it in the iterator destructor).
2012-03-23 11:19:19 +00:00
Gustavo André dos Santos Lopes
85725337d5 Revert "Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482"
This reverts commit a89c4a34ee.
2012-03-23 09:40:27 +00:00
Stanislav Malyshev
a89c4a34ee Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482
This reverts commit 714f1ff4b3.
2012-03-22 22:29:50 -07:00
Christopher Jones
7164175e85 Add initialization tests for SQLT_INT binds
Added tests for SQLT_INT binds particularly to check for uninitialized
variables.
2012-03-22 13:24:46 -07:00
Ilia Alshanetsky
b4aea52682 Fixed bug #61423 (gzip compression fails). 2012-03-22 09:13:45 -04:00
Dmitry Stogov
672fe54a00 Revert "Fixed reference counting"
This reverts commit 14af1fe692.
2012-03-22 15:51:58 +04:00
Dmitry Stogov
14af1fe692 Fixed reference counting 2012-03-22 15:03:16 +04:00
Xinchen Hui
523396cb28 Fix test, and merge the modification from trunk 2012-03-22 17:30:16 +08:00
Xinchen Hui
e96a172114 Fix test, which was broken by the fix for #61173 2012-03-22 17:10:03 +08:00
Rasmus Lerdorf
8b01a28bad Add open_basedir checks to readline_write_history and readline_read_history 2012-03-21 09:13:06 -07:00
Dmitry Stogov
657547f8c4 Fixed bug #49853 (Soap Client stream context header option ignored) 2012-03-21 16:32:49 +04:00
David Soria Parra
f7b10abae9 Replace $Revision$ with $Id$ in keyword expansion enable files 2012-03-20 17:53:47 +01:00
Matt Nowack
76ef76d2f8 Adding Braces in json.c to conform with coding standards 2012-03-20 17:29:04 +01:00
Christopher Jones
4a6d9b348f Minor text changes (to try new git repo) 2012-03-19 15:16:33 -07:00
Gustavo André dos Santos Lopes
227112cb0f - Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
when get_properties returns a hash table with (inaccessible) dynamic
  numeric properties).
2012-03-18 18:23:27 +00:00
Gustavo André dos Santos Lopes
714f1ff4b3 - Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
FilesystemIterator's iterators are requested more than once without
  having had its dtor callback called in between).
2012-03-18 15:07:20 +00:00
Gustavo André dos Santos Lopes
ef19fba2d5 - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in
  fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition
  for deleting the context was too broad) and so prevents segfaults in new
  circumstances (where the inhibition was not broad enough).
2012-03-17 19:37:30 +00:00
Ilia Alshanetsky
1ef5fa8710 Fixed bug #60947 (Segmentation fault while executing ibase_db_info) 2012-03-15 19:59:26 +00:00
Ilia Alshanetsky
601d17d1ae Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). 2012-03-14 20:20:33 +00:00
Ulf Wendel
8665e02ccd Test for MySQL version.Variable is deprecated in MySQL 5.6. 2012-03-14 14:55:09 +00:00
Christopher Jones
19c0803b77 Test portability and coverage changes 2012-03-12 18:08:34 +00:00
Ilia Alshanetsky
9c886ea553 Fixed bug #60222 (time_nanosleep() does validate input params). 2012-03-12 16:53:07 +00:00
Felipe Pena
af2fc625df - Fixed memory leak when calling SplFileInfo's constructor twice 2012-03-11 15:42:57 +00:00
Xinchen Hui
41fa157c44 Fixed bug #61088 (Memory leak in readline_callback_handler_install). 2012-03-11 09:19:38 +00:00
Xinchen Hui
533d90066e Fix test 2012-03-11 08:30:30 +00:00
Xinchen Hui
a7639291b4 Fixed bug #61347 (inconsist isset behavior of Arrayobject) 2012-03-11 08:27:55 +00:00
Gustavo André dos Santos Lopes
7bbf5fe650 - Fixed bug #61326 (ArrayObject comparison). 2012-03-10 17:19:39 +00:00
Ilia Alshanetsky
b61f335b9d Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length line is > 10 bytes). 2012-03-08 20:14:26 +00:00
Johannes Schlüter
ecf87a96b9 Use correct property ctor, should fix threading issue in bug #55334
# The code was refactored in 5_4/trunk, no need to merge
2012-03-08 12:52:12 +00:00
Gustavo André dos Santos Lopes
f413b3726c - Fixed bug #61253: Wrappers opened with errors concurrency problem
#NOTE: There is a very small possibility that this will further break
#extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the
#only one and it may leak memory after this. I say "further break" because
#extensions that do that are already broken (will segfault) under ZTS, which is
#why this patch is necessary.
#There was what I deem as tacit acceptance from 5.3/5.4 RMs on this.
2012-03-08 12:30:59 +00:00
Gustavo André dos Santos Lopes
b7c9f8ae8a - Fixed bug #61267: pdo_pgsql's PDO::exec() returns the number of SELECTed
rows on postgresql >= 9
2012-03-08 08:52:28 +00:00
Ilia Alshanetsky
f005f36cd6 Fixed bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) 2012-03-08 03:31:46 +00:00
Johannes Schlüter
abd5670566 Apply test fix for bug #61288 pdo_mysql___construct_options_libmysql.phpt test fails 2012-03-06 01:43:49 +00:00
Johannes Schlüter
512fdb4cc2 Fix bug #61003 mysql_stat() require a valid connection 2012-03-06 00:15:40 +00:00
Johannes Schlüter
dc0070e323 Fix bug #61194 PDO should export compression flag with myslqnd 2012-03-05 23:57:24 +00:00
Johannes Schlüter
b526e0e410 Fix Bug #61207 PDO::nextRowset() after a multi-statement query doesn't always work 2012-03-05 23:38:15 +00:00