From 5322b7ba611f6e76a7e80327de5d86acd36dd078 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 25 Jul 2023 10:03:16 +0100 Subject: libcamera: yaml: Increase the YAML parser limit Increase the maximum list size to 2000 elements. This allows, for example, larger lens shading config structures to be parsed correctly without throwing any errors. Signed-off-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/libcamera/yaml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp index 153a6d53..bf21141e 100644 --- a/src/libcamera/yaml_parser.cpp +++ b/src/libcamera/yaml_parser.cpp @@ -676,7 +676,7 @@ int YamlParserContext::parseDictionaryOrList(YamlObject::Type type, * Add a safety counter to make sure we don't loop indefinitely in case * the YAML file is malformed. */ - for (unsigned int sentinel = 1000; sentinel; sentinel--) { + for (unsigned int sentinel = 2000; sentinel; sentinel--) { auto evt = nextEvent(); if (!evt) return -EINVAL; -- cgit v1.2.1