From patchwork Tue Jul 25 09:03:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18887 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id DBC56BDC71 for ; Tue, 25 Jul 2023 09:03:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 456A6628C0; Tue, 25 Jul 2023 11:03:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1690275799; bh=PjojSOSmQ8taamdmqIGaLrv6nvJlcpDwNVmn/dfNOZA=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=mScp/ZuYa1wp6VoAZ+5Qq6G1YYevMBiFEWeuL8rEengjtBSyntOMuRIB/s0lJZVwC +iqvY5nEsY5n5WmjG1C7X4PfHSuESKCL+2P+iuTl5H8VYC/kIJd1blbfZRSdWTw3X0 z5vXt4IjkuaAcz2jOG8L5ul26d6mYtFCSq6sG3YqQkDrW9OdEdIrQFzk5PU1FyJSVX 2g0o+4E2+dptLi//gKK8dGBg9/q0LVpl4dgDyeUCUD4Pkh8i5lIdai2CNtzVxGgPsP p9mmIsSYJL2NNZTymBhX4yUCMBGLXC7bpvZu9WUehrZF4sdAIJc4Da9hAdgw2KoUF/ Tk2/PeIUmkoPA== Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D8EC600F7 for ; Tue, 25 Jul 2023 11:03:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="qEPpz1Dr"; dkim-atps=neutral Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3128fcd58f3so4887209f8f.1 for ; Tue, 25 Jul 2023 02:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1690275797; x=1690880597; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4WHFaBCwracYM1UhQo0EDcr/kq3njhNECRPmfmDd69M=; b=qEPpz1Dr6HoW4lH2GrM59dOTUD7TmhB3E3W0UDr14lspx+e8K1T+jl46E9QNA+Gqfb 53hCVvIspry/+N0vvCGV9L+W1OjPf3vUT4qJ3vYfSAKnNSwv/44VWZnMvgtO6fPtY3MX 7K+jHI/P+M3D1axhOxyzGRdwEkL0KioVsY+VmLlcfWDP5pg5+m4Rf6e+dUOnGzWoesrM LsaOLqFrYExpQ5OfuLAwSmZF8Krw9W3pYt84pkZck0W3zYquMAkvWH2Gu1fRaGgjAVa7 z3qPubBGzKuctAfqhH6jTfTSg57beGkeOzgCSY+IQLwMOf0UCWgho2fVw6sS3TBQce3d y2IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690275797; x=1690880597; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4WHFaBCwracYM1UhQo0EDcr/kq3njhNECRPmfmDd69M=; b=FRr7hZ0uQ690zeoWcqRsbXDwC/oUmfgOYkZgZLClRyqC7RVO45XtXyobsEN/Y5csvl crmccn3m0PkM7KbWIHQpyQGKNnGRc+zgQMvq5pBIgJ2xgZ+ueLtD8AvFDzLxPs1dJBOl 8+qflAHhzL5J81dxv73X0Fg7cgcUpUp2B3oFoe6FDGR0GPyUK63Qb+PMb64L/QcgubYR klA+kQvyNWSkfxz16xNL4rJrm5zPkIX9ngVeDs+oSXNK/GG9oLm7FShYMz2Qqb4rRrrC QSVP8oO0kfEzOEwvYagOriI8IvWYqH8ccSuK+tm93SpBf7FP88pvK1WC9/WaCjPkResN F0Qw== X-Gm-Message-State: ABy/qLbMIYUS+hARzYMQjNAbL4/z+wdb2EJglm8TUmG5hnsHE9S6nGwY x/br/NvORSo4lANc6uYinlmSWRTdEAN5Nwj0auWaKg== X-Google-Smtp-Source: APBJJlE5CLwGVqbWLE4TroG3HqEDMf7H1vtWlUbpAZI+TvfqYWISksyg6y7HEjXbWoOPZI8wds4LMw== X-Received: by 2002:adf:f18d:0:b0:313:f0d7:a43 with SMTP id h13-20020adff18d000000b00313f0d70a43mr9332659wro.23.1690275796658; Tue, 25 Jul 2023 02:03:16 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id q7-20020adffec7000000b003143c532431sm15438707wrs.27.2023.07.25.02.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 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 Subject: [libcamera-devel] [PATCH] libcamera: yaml: Increase the YAML parser limit X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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 153a6d53c3f9..bf21141e20bb 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;