Commit Graph

68934 Commits

Author SHA1 Message Date
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Felipe Pena
b8d453d8d4 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL)
2012-06-30 16:29:47 -03: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
ed1f058591 merge 2012-06-29 16:32:55 +03:00
andrey
b7dbcbd41f Merge branch 'PHP-5.3' into PHP-5.4 2012-06-29 14:48:37 +03:00
andrey
8fe87e7fea fix Bug #62273 Segmentation Fault in Mysqli/Mysqlnd 2012-06-29 14:42:36 +03:00
andrey
a614f8edea Merge branch 'PHP-5.3' into PHP-5.4 2012-06-29 14:41:11 +03:00
andrey
a19d5c520c Merge branch 'PHP-5.4' of ssh://git.php.net/php-src into PHP-5.4 2012-06-29 14:41:01 +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
d86b6ea35c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix some lengths in crypt()

Conflicts:
	ext/standard/crypt.c
2012-06-29 13:15:35 +02: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
08f4b3c3ac Merge branch 'PHP-5.3' into PHP-5.4 2012-06-29 12:43:14 +03:00
andrey
f826ea093f new charsets 2012-06-29 12:42:54 +03:00
Stanislav Malyshev
8992da2451 fix NEWS order 2012-06-28 18:08:11 -07:00
Anthony Ferrara
34ab5650bc Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
2012-06-28 20:36:21 -04: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
405ebfcd18 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Add json_last_error_msg() function
2012-06-28 20:18:19 +02: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
2996eeeed0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix #62432 ReflectionMethod random corrupt memory on high concurrent

Conflicts:
	ext/date/php_date.c
	ext/fileinfo/fileinfo.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/reflection/php_reflection.c
	ext/spl/spl_array.c
	ext/spl/spl_directory.c
	ext/spl/spl_dllist.c
	ext/spl/spl_fixedarray.c
	ext/spl/spl_heap.c
	ext/spl/spl_iterators.c
	ext/spl/spl_observer.c
	ext/sqlite/sqlite.c
	ext/sqlite3/sqlite3.c
	ext/tidy/tidy.c
	ext/xmlreader/php_xmlreader.c
	ext/xmlwriter/php_xmlwriter.c
	ext/xsl/php_xsl.c
	ext/zip/php_zip.c
2012-06-27 23:35:07 +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
d372b33c9b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Improve JSON error handling

Conflicts:
	ext/json/tests/bug54058.phpt
	ext/json/tests/bug61537.phpt
2012-06-27 12:28:55 +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
9a86784859 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix memleak in CLI

Conflicts:
	sapi/cli/php_cli.c
2012-06-27 11:46:57 +02:00
Johannes Schlüter
bc0972e78d Fix memleak in CLI 2012-06-27 11:42:43 +02:00
Stanislav Malyshev
7a0f4cfdde update NEWS 2012-06-26 21:56:11 -07:00
Stanislav Malyshev
ffcfa6f920 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  ws fix
  BFN
  Fix bug #62373 (serialize() generates wrong reference to the object)

Conflicts:
	php.ini-development
	php.ini-production
2012-06-26 21:53:40 -07:00
Stanislav Malyshev
ad2bee193d ws fix 2012-06-26 15:22:29 -07:00
Xinchen Hui
a44a1dc194 Fixed bug #62357 (compile failure: (S) Arguments missing for built-in function __memcmp).
Any C library function may be a macro, We should avoid using ZEND_STRS(L) as their arguments
2012-06-26 18:42:33 +08:00
Moriyoshi Koizumi
ce2082d24f BFN 2012-06-25 19:20:38 +09:00
Moriyoshi Koizumi
91e1df704e Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:14:19 +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
ad641950b3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix memory allocation checks for base64 encode
2012-06-24 23:56:55 +02: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
36fa17a5fa Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Improve json_encode error handling
  - BFN

Conflicts:
	ext/json/json.c
2012-06-23 21:14:45 +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
e886272577 - BFN 2012-06-23 15:21:32 -03:00
Felipe Pena
cc90ac54be - BFN 2012-06-23 15:21:20 -03:00
Felipe Pena
5e36306feb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Improved fix for #62384
2012-06-23 15:16:13 -03:00
Felipe Pena
c3f34796a0 - Improved fix for #62384 2012-06-23 15:10:47 -03:00
Johannes Schlüter
2418791731 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove unneeded and outdated ChangeLog file
2012-06-22 20:01:06 +02:00
Johannes Schlüter
84b1c568f4 Remove unneeded and outdated ChangeLog file 2012-06-22 20:00:20 +02:00
Johannes Schlüter
5e23a047ac Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove extra ;
2012-06-22 17:33:22 +02:00
Johannes Schlüter
a62d4e2c43 Remove extra ; 2012-06-22 17:32:46 +02:00
Felipe Pena
4af92aca87 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62384 (Attempting to invoke a Closure more than once causes segfaul)
2012-06-22 12:05:55 -03: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
af516750ff Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Improve check for :memory: pseudo-filename in SQlite

Conflicts:
	ext/sqlite3/sqlite3.c
2012-06-22 12:50:30 +02:00
Johannes Schlüter
055ecbc628 Improve check for :memory: pseudo-filename in SQlite 2012-06-22 12:48:39 +02:00
Lonny Kapelushnik
2178b1d02d Adding in test for feature 55218 2012-06-21 23:21:17 -04:00
Lonny Kapelushnik
f1ef8b327f Implements feature 55218
Allows you to recursively check namespaces under a child node
instead of from the root of the XML doc
2012-06-21 22:34:46 -04:00
Johannes Schlüter
041dd77135 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove outdated and user-specific files
2012-06-20 19:47:44 +02:00