mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-13 12:10:50 +00:00
Compare commits
4
Commits
php-5.4.5
...
php-5.3.15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c180a72112 | ||
|
|
1f6c43f055 | ||
|
|
bcc87ba68e | ||
|
|
d80ff39189 |
No files matched your search
@@ -1,6 +1,7 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2012, PHP 5.3.15
|
||||
19 Jul 2012, PHP 5.3.15
|
||||
|
||||
- Zend Engine:
|
||||
. Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that
|
||||
includes a semi-colon). (Pierrick)
|
||||
@@ -9,8 +10,8 @@ PHP NEWS
|
||||
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
|
||||
|
||||
- Core:
|
||||
. Fixed potential overflow in _php_stream_scandir. (Jason Powell,
|
||||
Stas)
|
||||
. Fixed potential overflow in _php_stream_scandir, CVE-2012-2688. (Jason
|
||||
Powell, Stas)
|
||||
. Fixed bug #62432 (ReflectionMethod random corrupt memory on high
|
||||
concurrent). (Johannes)
|
||||
. Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed
|
||||
@@ -44,7 +45,7 @@ PHP NEWS
|
||||
. Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
|
||||
|
||||
- JSON:
|
||||
. Improved error handling. (Nikita Popov)
|
||||
. Reverted fix for bug #61537. (Johannes)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe)
|
||||
@@ -59,9 +60,14 @@ PHP NEWS
|
||||
. Fixed bug #62262 (RecursiveArrayIterator does not implement Countable).
|
||||
(Nikita Popov)
|
||||
|
||||
- SQLite:
|
||||
. Fixed open_basedir bypass, CVE-2012-3365. (Johannes, reported by Yury
|
||||
Maryshev)
|
||||
|
||||
- XML Writer:
|
||||
. Fixed bug #62064 (memory leak in the XML Writer module).
|
||||
(jean-pierre dot lozi at lip6 dot fr)
|
||||
|
||||
- Zip:
|
||||
. Upgraded libzip to 0.10.1 (Anatoliy)
|
||||
|
||||
|
||||
+1
-1
@@ -331,7 +331,7 @@ END_EXTERN_C()
|
||||
if (idx-1 > LONG_MAX) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
idx = (ulong)(-(long)idx); \
|
||||
idx = -idx; \
|
||||
} else if (idx > LONG_MAX) { /* overflow */ \
|
||||
break; \
|
||||
} \
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=15
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
+4
-7
@@ -73,7 +73,6 @@ static PHP_MINIT_FUNCTION(json)
|
||||
REGISTER_LONG_CONSTANT("JSON_HEX_QUOT", PHP_JSON_HEX_QUOT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("JSON_PARTIAL_OUTPUT_ON_ERROR", PHP_JSON_PARTIAL_OUTPUT_ON_ERROR, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, CONST_CS | CONST_PERSISTENT);
|
||||
@@ -321,7 +320,9 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR
|
||||
}
|
||||
if (len < 0) {
|
||||
JSON_G(error_code) = PHP_JSON_ERROR_UTF8;
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid UTF-8 sequence in argument");
|
||||
if (!PG(display_errors)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid UTF-8 sequence in argument");
|
||||
}
|
||||
smart_str_appendl(buf, "null", 4);
|
||||
} else {
|
||||
smart_str_appendl(buf, "\"\"", 2);
|
||||
@@ -570,11 +571,7 @@ static PHP_FUNCTION(json_encode)
|
||||
|
||||
php_json_encode(&buf, parameter, options TSRMLS_CC);
|
||||
|
||||
if (JSON_G(error_code) != PHP_JSON_ERROR_NONE && options ^ PHP_JSON_PARTIAL_OUTPUT_ON_ERROR) {
|
||||
ZVAL_FALSE(return_value);
|
||||
} else {
|
||||
ZVAL_STRINGL(return_value, buf.c, buf.len, 1);
|
||||
}
|
||||
ZVAL_STRINGL(return_value, buf.c, buf.len, 1);
|
||||
|
||||
smart_str_free(&buf);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ PHP_JSON_API void php_json_decode(zval *return_value, char *str, int str_len, ze
|
||||
#define PHP_JSON_HEX_QUOT (1<<3)
|
||||
#define PHP_JSON_FORCE_OBJECT (1<<4)
|
||||
#define PHP_JSON_NUMERIC_CHECK (1<<5)
|
||||
#define PHP_JSON_PARTIAL_OUTPUT_ON_ERROR (1<<9)
|
||||
|
||||
#define PHP_JSON_OUTPUT_ARRAY 0
|
||||
#define PHP_JSON_OUTPUT_OBJECT 1
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #43941 (json_encode() invalid UTF-8)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("json")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(json_encode("abc"));
|
||||
var_dump(json_encode("ab\xE0"));
|
||||
var_dump(json_encode("ab\xE0c"));
|
||||
var_dump(json_encode(array("ab\xE0", "ab\xE0c", "abc")));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(5) ""abc""
|
||||
string(4) "null"
|
||||
string(4) "null"
|
||||
string(17) "[null,null,"abc"]"
|
||||
Done
|
||||
|
||||
@@ -29,14 +29,7 @@ json_encode($c);
|
||||
var_dump(json_last_error());
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
int(5)
|
||||
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
int(5)
|
||||
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
int(5)
|
||||
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
int(5)
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #61537 (json_encode() incorrectly truncates/discards information)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("json")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$invalid_utf8 = "\x9f";
|
||||
var_dump(json_encode($invalid_utf8), json_last_error());
|
||||
var_dump(json_encode($invalid_utf8, JSON_PARTIAL_OUTPUT_ON_ERROR), json_last_error());
|
||||
|
||||
$invalid_utf8 = "an invalid sequen\xce in the middle of a string";
|
||||
var_dump(json_encode($invalid_utf8), json_last_error());
|
||||
var_dump(json_encode($invalid_utf8, JSON_PARTIAL_OUTPUT_ON_ERROR), json_last_error());
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
bool(false)
|
||||
int(5)
|
||||
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
string(4) "null"
|
||||
int(5)
|
||||
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
bool(false)
|
||||
int(5)
|
||||
|
||||
Warning: json_encode(): Invalid UTF-8 sequence in argument in %s on line %d
|
||||
string(4) "null"
|
||||
int(5)
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 3
|
||||
#define PHP_RELEASE_VERSION 15
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "5.3.15-dev"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.3.15"
|
||||
#define PHP_VERSION_ID 50315
|
||||
Reference in new issue
Block a user