1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 16:38:25 +02:00
Commit Graph

49414 Commits

Author SHA1 Message Date
Derick Rethans 0a2833bbef - Updated to version 2012.5 (2012e) 2012-08-06 12:59:38 +01: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
Hannes Magnusson 88f7f3c00f Do not unload shared extensions when checking for leaks 2012-07-17 10:04:56 +01:00
Jille Timmermans 86b4252c8e Typofix in test-description 2012-07-14 22:07:50 -07:00
Felipe Pena 63f3962a90 - Fixed bug #62525 (sigabrt while converting floating point to string) 2012-07-14 15:15:11 -03: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 896d0fcd41 updated NEWS 2012-07-11 22:33:42 +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
Nuno Lopes b2b018d5f7 appease MSVC (doesnt like unary minus of unsigned ints) 2012-07-08 15:28:29 -04:00
Anthony Ferrara 26b37f1792 Fix two issues with run-tests.php
1. E_STRICT error due to passing return of array_intersect() into reset() directly
2. Details in junit output can produce invalid UTF-8 and XML due to unescaped characters
2012-07-06 22:37:50 -04: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 Schlüter 6b2b195267 This wil be PHP 5.3.16 2012-07-05 01:15:27 +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
Nuno Lopes d80ff39189 fix (signed) integer overflow (part of bug #52550 2012-07-02 01:35:28 -04: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
Stanislav Malyshev 5f31c81f07 remove duplicates, fix order 2012-06-30 17:36:22 -07:00
Felipe Pena 75d8af715c - Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL) 2012-06-30 16:29:30 -03: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
Johannes Schlüter bc0972e78d Fix memleak in CLI 2012-06-27 11:42:43 +02:00
Stanislav Malyshev ad2bee193d ws fix 2012-06-26 15:22:29 -07:00
Moriyoshi Koizumi ce2082d24f BFN 2012-06-25 19:20:38 +09: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 cc90ac54be - BFN 2012-06-23 15:21:20 -03:00
Felipe Pena c3f34796a0 - Improved fix for #62384 2012-06-23 15:10:47 -03:00
Johannes Schlüter 84b1c568f4 Remove unneeded and outdated ChangeLog file 2012-06-22 20:00:20 +02: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 5d81fe6f12 Add NEWS for bug #62262 2012-06-19 18:40:46 +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 f072662621 one more correction for COM upgrading notes 2012-06-19 14:42:59 +02:00
Anatoliy Belsky a8948d0808 split gzgetc_basic.phpt for zlib 1.2.7 2012-06-19 14:08:34 +02:00
Anatoliy Belsky 592917f91f com ext upgrading correction 2012-06-18 22:07:19 +02:00