From patchwork Sun Apr 11 16:48:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Fricke X-Patchwork-Id: 11886 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 B23ECBD224 for ; Sun, 11 Apr 2021 16:49:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 12F63687F7; Sun, 11 Apr 2021 18:49:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=posteo.net header.i=@posteo.net header.b="madRvyP/"; dkim-atps=neutral Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 31B46687F4 for ; Sun, 11 Apr 2021 18:49:08 +0200 (CEST) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 32FC72400FF for ; Sun, 11 Apr 2021 18:49:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1618159747; bh=72QWPr+ffBFMyew+vNXHGOOMesIuoscBIqQWUKcz91s=; h=From:To:Cc:Subject:Date:From; b=madRvyP/COHxoVIwTqyKY97lR/+Irn+6I8QKCL5SlabAdvxmT4h6/V6hB+2UwWYJG LanIbXiITS9YWr6NE19zS2+UIHOIjs7W9d5tVb6FmErAc9ANHwmXJapvY2/t7E1gmU bybMlkNQDBfBAX60hmHV8Uu0Y1Ete7o0OFdCqA+fWipAgMopfFzO3ZPJvykTV20alS tXZE8Xoez4qgwjDYxNH2gCh/iwEWAHP/UW5pzmkSFiNSkYmOoM6BmB8mlZ6K9bawXE cy9Os3xTZT/Cu5S8Kh+gMIN8nEBxkSxF0iLUi2+Xpo/NbRuqGH+5oBoSHwazysY+nY eVCFzm8jBEOGw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FJHrf4XV2z6tmL; Sun, 11 Apr 2021 18:49:06 +0200 (CEST) From: Sebastian Fricke To: libcamera-devel@lists.libcamera.org Date: Sun, 11 Apr 2021 18:48:58 +0200 Message-Id: <20210411164858.29961-1-sebastian.fricke@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] pipeline: rkisp1: Add check for non-existent frame info 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a check, that makes sure that the given FrameBuffer is associated to a RkISP1FrameInfo instance. The current code tries to access the frame info without checking if it actually exists. Fixes: 0eb65e14e libcamera: pipeline: rkisp1: Attach to an IPA Signed-off-by: Sebastian Fricke Reviewed-by: Kieran Bingham Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 03757327..eca7d608 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -1079,6 +1079,8 @@ void PipelineHandlerRkISP1::paramReady(FrameBuffer *buffer) RkISP1CameraData *data = cameraData(activeCamera_); RkISP1FrameInfo *info = data->frameInfo_.find(buffer); + if (!info) + return; info->paramDequeued = true; tryCompleteRequest(info->request);