Patch Detail
Show a patch.
GET /api/patches/19541/?format=api
{ "id": 19541, "url": "https://patchwork.libcamera.org/api/patches/19541/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19541/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20240226094857.2207313-3-kieran.bingham@ideasonboard.com>", "date": "2024-02-26T09:48:57", "name": "[2/2] utils: ipu3: Fix return value check on file output", "commit_ref": "bdd85fa01c6078950b93d4c9491694d077c3b60b", "pull_url": null, "state": "accepted", "archived": false, "hash": "cda078f80e1efc9dc811f9a095aa93fa83060962", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19541/mbox/", "series": [ { "id": 4181, "url": "https://patchwork.libcamera.org/api/series/4181/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4181", "date": "2024-02-26T09:48:55", "name": "Two small fixes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4181/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19541/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19541/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 DC4D9BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Feb 2024 09:49:05 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD6946286C;\n\tMon, 26 Feb 2024 10:49:03 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4E27A6286B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Feb 2024 10:49:01 +0100 (CET)", "from Monstersaurus.local\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0419A15C4;\n\tMon, 26 Feb 2024 10:48:49 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"K53nUjye\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708940930;\n\tbh=hc3m/NVGQaCCRxmZpE2YxJwJ8sbmbrr9QnyXP4wBDzw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=K53nUjyelbar6yautxNwK8YuhyzVc7ImXeuOCpJKY5UZMCk8fpZXCB7J3uhFlm5aJ\n\tXQVT9NOyn5keG7qumXUGbRCx1xwT4LzDFVCOS9CSsriXSnKMftia4xGI/5O87+YosO\n\tZ83ADHpDI03iqd3a36ljKR+X2wMGDPZ9J2Zy7lbA=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Subject": "[PATCH 2/2] utils: ipu3: Fix return value check on file output", "Date": "Mon, 26 Feb 2024 09:48:57 +0000", "Message-Id": "<20240226094857.2207313-3-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20240226094857.2207313-1-kieran.bingham@ideasonboard.com>", "References": "<20240226094857.2207313-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Cc": "Johan Mattsson <39247600+mjunix@users.noreply.github.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The data parsed by ipu3-unpack is written out using the write() c\nlibrary call, but the error code is incorrectly checked which misses the\nsingle erroroneous return value returned by the function.\n\nFix it to explicitly check against the error code.\n\nReported-by: Johan Mattsson <39247600+mjunix@users.noreply.github.com>\nFixes: 23ac77dc4a09 (\"utils: ipu3: Add IPU3 raw capture unpack utility\")\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n utils/ipu3/ipu3-unpack.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/utils/ipu3/ipu3-unpack.c b/utils/ipu3/ipu3-unpack.c\nindex 9d2c1200d932..c96fafed2435 100644\n--- a/utils/ipu3/ipu3-unpack.c\n+++ b/utils/ipu3/ipu3-unpack.c\n@@ -78,7 +78,7 @@ int main(int argc, char *argv[])\n \t\t}\n \n \t\tret = write(out_fd, out_data, 50);\n-\t\tif (ret < -1) {\n+\t\tif (ret == -1) {\n \t\t\tfprintf(stderr, \"Failed to write output data: %s\\n\",\n \t\t\t\tstrerror(errno));\n \t\t\tgoto done;\n", "prefixes": [ "2/2" ] }