From 925c1d77fcc72636924c3c13428a34180c30f96f Mon Sep 17 00:00:00 2001 From: Vladimir Glavnyy <31897320+vglavnyy@users.noreply.github.com> Date: Thu, 4 Oct 2018 23:27:37 +0700 Subject: =?UTF-8?q?Fix=20recursion=20counter=20check.=20Add=20control=20to?= =?UTF-8?q?=20override=20depth=20of=20nested=20=E2=80=A6=20(#4953)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix recursion counter check. Add control to override depth of nested objects. * Change if-condition to `>=` --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 76619dcb..4a6b259f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,12 @@ if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS) set(FLATBUFFERS_BUILD_TESTS OFF) endif() +if(DEFINED FLATBUFFERS_MAX_PARSING_DEPTH) + # Override the default recursion depth limit. + add_definitions(-DFLATBUFFERS_MAX_PARSING_DEPTH=${FLATBUFFERS_MAX_PARSING_DEPTH}) + message(STATUS "FLATBUFFERS_MAX_PARSING_DEPTH: ${FLATBUFFERS_MAX_PARSING_DEPTH}") +endif() + set(FlatBuffers_Library_SRCS include/flatbuffers/code_generators.h include/flatbuffers/base.h -- cgit v1.2.3