diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-10-28 23:00:10 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-10-28 23:00:10 +0100 |
commit | 66aead4b5f48e3496582d48474a3f4c3864cfe1d (patch) | |
tree | cb2a94da79b5fa5d1262400bdefd8726a6b5ddea /sapi/phpdbg/phpdbg_wait.c | |
parent | 9afb17868c3e853fb33e4500740328283c9c3057 (diff) | |
parent | be5d38976807c0e16c04fc53192ddab89d946a90 (diff) | |
download | php-git-66aead4b5f48e3496582d48474a3f4c3864cfe1d.tar.gz |
Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
sapi/phpdbg/phpdbg_wait.c
sapi/phpdbg/phpdbg_webdata_transfer.c
Diffstat (limited to 'sapi/phpdbg/phpdbg_wait.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_wait.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index 9051ca379f..68ccf6c123 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -18,7 +18,7 @@ #include "phpdbg_wait.h" #include "phpdbg_prompt.h" -#include "ext/json/JSON_parser.h" +#include "ext/standard/php_var.h" #include "ext/standard/basic_functions.h" ZEND_EXTERN_MODULE_GLOBALS(phpdbg); @@ -126,16 +126,18 @@ static int phpdbg_array_intersect(phpdbg_intersect_ptr *info, zval **ptr) { } void phpdbg_webdata_decompress(char *msg, int len TSRMLS_DC) { -#ifdef HAVE_JSON zval *free_zv = NULL; zval zv, *zvp; HashTable *ht; - php_json_decode(&zv, msg, len, 1, 1000 /* enough */ TSRMLS_CC); + php_unserialize_data_t var_hash; - if (JSON_G(error_code) != PHP_JSON_ERROR_NONE) { - phpdbg_error("wait", "type=\"invaliddata\" import=\"fail\"", "Malformed JSON was sent to this socket, arborting"); + PHP_VAR_UNSERIALIZE_INIT(var_hash); + if (!php_var_unserialize(&zv, (const unsigned char **) &msg, (unsigned char *) msg + len, &var_hash TSRMLS_CC)) { + PHP_VAR_UNSERIALIZE_DESTROY(var_hash); + phpdbg_error("wait", "type=\"invaliddata\" import=\"fail\"", "Malformed serialized was sent to this socket, arborting"); return; } + PHP_VAR_UNSERIALIZE_DESTROY(var_hash); ht = Z_ARRVAL(zv); @@ -339,7 +341,6 @@ void phpdbg_webdata_decompress(char *msg, int len TSRMLS_DC) { /* Reapply raw input */ /* ??? */ -#endif } PHPDBG_COMMAND(wait) /* {{{ */ |