]> git.ipfire.org Git - thirdparty/systemd.git/commit
json: enforce a maximum nesting depth for json variants
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Oct 2018 13:38:17 +0000 (15:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 18 Oct 2018 14:44:51 +0000 (16:44 +0200)
commitb2fa0d4fcab75f7012fc899dedfa68afeea9903c
tree97ac022a45c4863b1be9c152b5a6494df7f09ff6
parenta7efb030391547d01b4c0bcc5a296404decc75ab
json: enforce a maximum nesting depth for json variants

Simply as a safety precaution so that json objects we read are not
arbitrary amounts deep, so that code that processes json objects
recursively can't be easily exploited (by hitting stack limits).

Follow-up for oss-fuzz#10908

(Nice is that we can accomodate for this counter without increasing the
size of the JsonVariant object.)
src/basic/json.c
src/test/test-json.c