correctly with a non truecolour image, reported by Hamid Ebadi, APA Laboratory.
(Fixes CVE-2008-5498) (Scott)
+- Fixed segfault when malformed string passed to json_decode(). (Scott)
+
- Fixed bug #46889 (Memory leak in strtotime()). (Derick)
- Fixed bug #46887 (Invalid calls to php_error_docref()).
(oeriksson at mandriva dot com, Ilia)
}
*/
case -7:
- if (type != -1 &&
- (JSON(the_stack)[JSON(the_top)] == MODE_OBJECT ||
- JSON(the_stack)[JSON(the_top)] == MODE_ARRAY))
+ if (type != -1 && JSON(the_stack)[JSON(the_top)] == MODE_OBJECT)
{
zval *mval;
smart_str_0(&buf);
*/
case -5:
{
- if (type != -1 &&
- (JSON(the_stack)[JSON(the_top)] == MODE_OBJECT ||
- JSON(the_stack)[JSON(the_top)] == MODE_ARRAY))
+ if (type != -1 && JSON(the_stack)[JSON(the_top)] == MODE_ARRAY)
{
zval *mval;
smart_str_0(&buf);
var_dump(json_decode("руссиш"));
var_dump(json_decode("blah"));
var_dump(json_decode(NULL));
+var_dump(json_decode('[1}'));
var_dump(json_decode('{ "test": { "foo": "bar" } }'));
var_dump(json_decode('{ "test": { "foo": "" } }'));
var_dump(json_decode('{ "": { "foo": "" } }'));
string(12) "руссиш"
string(4) "blah"
NULL
+NULL
object(stdClass)#1 (1) {
["test"]=>
object(stdClass)#2 (1) {