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>
This commit is contained in:
Naushir Patuck 2023-07-25 10:03:16 +01:00 committed by Laurent Pinchart
parent baab00721c
commit 5322b7ba61

View file

@ -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;