]> 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)
committerAsterisk Development Team <asteriskteam@digium.com>
Fri, 12 Jan 2024 18:21:32 +0000 (18:21 +0000)
commit7a4884c1cb01e3a00b53e5c28c3b08bf9dd5edd5
treede19db39e4bb4c11d17cf4e04963024be2229bba
parente5368804d3552255e9e683d81f6bc7d5de5f92db
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.

(cherry picked from commit 6edeb9048573c3c35292046d97179998ef187c73)
funcs/func_json.c
include/asterisk/json.h
main/json.c