]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_json: Fix crashes for some types
authorBastian Triller <bastian.triller@gmail.com>
Thu, 21 Sep 2023 06:24:37 +0000 (08:24 +0200)
committerBastian Triller <bastian.triller@gmail.com>
Thu, 5 Oct 2023 14:37:55 +0000 (14:37 +0000)
commit6edeb9048573c3c35292046d97179998ef187c73
tree5fa6c5df323b5975cbce3090c4fbb621abea6eeb
parent792ad9fec8bddfa8096ab972a804c3fccf464d3e
func_json: Fix crashes for some types

This commit fixes crashes in JSON_DECODE() for types null, true, false
and real numbers.

In addition it ensures that a path is not deeper than 32 levels.

Also allow root object to be an array.

Add unit tests for above cases.
funcs/func_json.c
include/asterisk/json.h
main/json.c