{"id":3458,"url":"https://patchwork.libcamera.org/api/1.1/patches/3458/?format=json","web_url":"https://patchwork.libcamera.org/patch/3458/","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":"<20200414070642.22366-3-email@uajain.com>","date":"2020-04-14T07:06:58","name":"[libcamera-devel,2/3] libcamera: camera: Exclude streams whose configuration cannot be updated","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"03448bb7ad24fc81a5a881d6ed0b28eaff7289f5","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/people/1/?format=json","name":"Umang Jain","email":"email@uajain.com"},"delegate":{"id":12,"url":"https://patchwork.libcamera.org/api/1.1/users/12/?format=json","username":"uajain","first_name":"Umang","last_name":"Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/3458/mbox/","series":[{"id":807,"url":"https://patchwork.libcamera.org/api/1.1/series/807/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=807","date":"2020-04-14T07:06:52","name":"More Coverity scans fixes","version":1,"mbox":"https://patchwork.libcamera.org/series/807/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3458/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3458/checks/","tags":{},"headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3263B62E31\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Apr 2020 09:07:00 +0200 (CEST)","by filter0084p3las1.sendgrid.net with SMTP id\n\tfilter0084p3las1-28345-5E956112-A5\n\t2020-04-14 07:06:58.689315235 +0000 UTC m=+1071357.482902598","from mail.uajain.com (unknown)\n\tby ismtpd0005p1hnd1.sendgrid.net (SG) with ESMTP\n\tid 8C40N9AZQTGMs5WmDfmuYA Tue, 14 Apr 2020 07:06:58.233 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"kvWdn3qF\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=from:subject:in-reply-to:references:mime-version:to:cc:\n\tcontent-transfer-encoding:content-type;\n\ts=s1; bh=fNnGy3RvRFDdZhehFp4tLjtkmJxZA9e4wg6lLnfB9do=;\n\tb=kvWdn3qFcvEv8CnZ6cKExWEwaxg6bbcWnxhYkZDociL+MDtFLoTlgQrrCxo6PnzooZUr\n\t7+gthZKrJchIXMUBxMZO84tXEimbu0MS+HhhjeVfGM7t/L2/RHjEF5TC74VFHhFo9fMPUn\n\tr33GjIS5+9Vqr5WhyGBAI7xSHxioqbZMQ=","From":"Umang Jain <email@uajain.com>","Date":"Tue, 14 Apr 2020 07:06:58 +0000 (UTC)","Message-Id":"<20200414070642.22366-3-email@uajain.com>","In-Reply-To":"<20200414070642.22366-1-email@uajain.com>","References":"<20200414070642.22366-1-email@uajain.com>","Mime-Version":"1.0","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcZj5z9XHfwy1Ge6f/0y1LY2f51WPNaWJRgsmMiF70i3Un7/X3xGc5O03jiwnriUbhzR+WCKswraEyFVRl6lf7CN1wH8e1dnyLvdWcnwQlSRCk4dh0aVSmmqPu1dsb3gwxzmoHRSsxOmwxTMJJQhts9Z2iAND3ru/F+vAOih75TF4Mhxvefe3t79JuDG0xKYfk","To":"libcamera-devel@lists.libcamera.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=us-ascii","Subject":"[libcamera-devel] [PATCH 2/3] libcamera: camera: Exclude streams\n\twhose configuration cannot be updated","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>","X-List-Received-Date":"Tue, 14 Apr 2020 07:07:00 -0000"},"content":"This prevents a null-deference below in the loop.\n\nPointed out by Coverity DefectId=279069\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/libcamera/camera.cpp | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 8c3bb2c..926e414 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -777,9 +777,11 @@ int Camera::configure(CameraConfiguration *config)\n \tp_->activeStreams_.clear();\n \tfor (const StreamConfiguration &cfg : *config) {\n \t\tStream *stream = cfg.stream();\n-\t\tif (!stream)\n+\t\tif (!stream) {\n \t\t\tLOG(Camera, Fatal)\n \t\t\t\t<< \"Pipeline handler failed to update stream configuration\";\n+\t\t\tcontinue;\n+\t\t}\n \n \t\tstream->configuration_ = cfg;\n \t\tp_->activeStreams_.insert(stream);\n","prefixes":["libcamera-devel","2/3"]}