{"id":18887,"url":"https://patchwork.libcamera.org/api/1.1/patches/18887/?format=json","web_url":"https://patchwork.libcamera.org/patch/18887/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230725090316.29758-1-naush@raspberrypi.com>","date":"2023-07-25T09:03:16","name":"[libcamera-devel] libcamera: yaml: Increase the YAML parser limit","commit_ref":"5322b7ba611f6e76a7e80327de5d86acd36dd078","pull_url":null,"state":"accepted","archived":false,"hash":"e2fa4851e6133066ae133c578e07ec8e508776fa","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18887/mbox/","series":[{"id":3985,"url":"https://patchwork.libcamera.org/api/1.1/series/3985/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3985","date":"2023-07-25T09:03:16","name":"[libcamera-devel] libcamera: yaml: Increase the YAML parser limit","version":1,"mbox":"https://patchwork.libcamera.org/series/3985/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18887/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18887/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DBC56BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Jul 2023 09:03:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 456A6628C0;\n\tTue, 25 Jul 2023 11:03:19 +0200 (CEST)","from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n\t[IPv6:2a00:1450:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D8EC600F7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Jul 2023 11:03:17 +0200 (CEST)","by mail-wr1-x42b.google.com with SMTP id\n\tffacd0b85a97d-3128fcd58f3so4887209f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Jul 2023 02:03:17 -0700 (PDT)","from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tq7-20020adffec7000000b003143c532431sm15438707wrs.27.2023.07.25.02.03.16\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 25 Jul 2023 02:03:16 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690275799;\n\tbh=PjojSOSmQ8taamdmqIGaLrv6nvJlcpDwNVmn/dfNOZA=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=mScp/ZuYa1wp6VoAZ+5Qq6G1YYevMBiFEWeuL8rEengjtBSyntOMuRIB/s0lJZVwC\n\t+iqvY5nEsY5n5WmjG1C7X4PfHSuESKCL+2P+iuTl5H8VYC/kIJd1blbfZRSdWTw3X0\n\tz5vXt4IjkuaAcz2jOG8L5ul26d6mYtFCSq6sG3YqQkDrW9OdEdIrQFzk5PU1FyJSVX\n\t2g0o+4E2+dptLi//gKK8dGBg9/q0LVpl4dgDyeUCUD4Pkh8i5lIdai2CNtzVxGgPsP\n\tp9mmIsSYJL2NNZTymBhX4yUCMBGLXC7bpvZu9WUehrZF4sdAIJc4Da9hAdgw2KoUF/\n\tTk2/PeIUmkoPA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690275797; x=1690880597;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=4WHFaBCwracYM1UhQo0EDcr/kq3njhNECRPmfmDd69M=;\n\tb=qEPpz1Dr6HoW4lH2GrM59dOTUD7TmhB3E3W0UDr14lspx+e8K1T+jl46E9QNA+Gqfb\n\t53hCVvIspry/+N0vvCGV9L+W1OjPf3vUT4qJ3vYfSAKnNSwv/44VWZnMvgtO6fPtY3MX\n\t7K+jHI/P+M3D1axhOxyzGRdwEkL0KioVsY+VmLlcfWDP5pg5+m4Rf6e+dUOnGzWoesrM\n\tLsaOLqFrYExpQ5OfuLAwSmZF8Krw9W3pYt84pkZck0W3zYquMAkvWH2Gu1fRaGgjAVa7\n\tz3qPubBGzKuctAfqhH6jTfTSg57beGkeOzgCSY+IQLwMOf0UCWgho2fVw6sS3TBQce3d\n\ty2IQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qEPpz1Dr\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690275797; x=1690880597;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=4WHFaBCwracYM1UhQo0EDcr/kq3njhNECRPmfmDd69M=;\n\tb=FRr7hZ0uQ690zeoWcqRsbXDwC/oUmfgOYkZgZLClRyqC7RVO45XtXyobsEN/Y5csvl\n\tcrmccn3m0PkM7KbWIHQpyQGKNnGRc+zgQMvq5pBIgJ2xgZ+ueLtD8AvFDzLxPs1dJBOl\n\t8+qflAHhzL5J81dxv73X0Fg7cgcUpUp2B3oFoe6FDGR0GPyUK63Qb+PMb64L/QcgubYR\n\tklA+kQvyNWSkfxz16xNL4rJrm5zPkIX9ngVeDs+oSXNK/GG9oLm7FShYMz2Qqb4rRrrC\n\tQSVP8oO0kfEzOEwvYagOriI8IvWYqH8ccSuK+tm93SpBf7FP88pvK1WC9/WaCjPkResN\n\tF0Qw==","X-Gm-Message-State":"ABy/qLbMIYUS+hARzYMQjNAbL4/z+wdb2EJglm8TUmG5hnsHE9S6nGwY\n\tx/br/NvORSo4lANc6uYinlmSWRTdEAN5Nwj0auWaKg==","X-Google-Smtp-Source":"APBJJlE5CLwGVqbWLE4TroG3HqEDMf7H1vtWlUbpAZI+TvfqYWISksyg6y7HEjXbWoOPZI8wds4LMw==","X-Received":"by 2002:adf:f18d:0:b0:313:f0d7:a43 with SMTP id\n\th13-20020adff18d000000b00313f0d70a43mr9332659wro.23.1690275796658; \n\tTue, 25 Jul 2023 02:03:16 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 25 Jul 2023 10:03:16 +0100","Message-Id":"<20230725090316.29758-1-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] libcamera: yaml: Increase the YAML parser\n\tlimit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Increase the maximum list size to 2000 elements. This allows, for\nexample, larger lens shading config structures to be parsed correctly\nwithout throwing any errors.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/yaml_parser.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/yaml_parser.cpp b/src/libcamera/yaml_parser.cpp\nindex 153a6d53c3f9..bf21141e20bb 100644\n--- a/src/libcamera/yaml_parser.cpp\n+++ b/src/libcamera/yaml_parser.cpp\n@@ -676,7 +676,7 @@ int YamlParserContext::parseDictionaryOrList(YamlObject::Type type,\n \t * Add a safety counter to make sure we don't loop indefinitely in case\n \t * the YAML file is malformed.\n \t */\n-\tfor (unsigned int sentinel = 1000; sentinel; sentinel--) {\n+\tfor (unsigned int sentinel = 2000; sentinel; sentinel--) {\n \t\tauto evt = nextEvent();\n \t\tif (!evt)\n \t\t\treturn -EINVAL;\n","prefixes":["libcamera-devel"]}