summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-07-25 10:03:16 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-07-28 18:34:02 +0300
commit5322b7ba611f6e76a7e80327de5d86acd36dd078 (patch)
treebf1080c6e1c6d6f95211ec0abe7cc07013a298d6
parentbaab00721cc577bcfb0d95e810202c57f35055b0 (diff)
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 <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--src/libcamera/yaml_parser.cpp2
1 files changed, 1 insertions, 1 deletions
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;