Show a patch.

GET /api/1.1/patches/3906/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3906,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3906/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3906/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200603141609.18584-3-paul.elder@ideasonboard.com>",
    "date": "2020-06-03T14:16:06",
    "name": "[libcamera-devel,2/5] v4l2: v4l2_camera_proxy: Fix bounds check for VIDIOC_ENUM_FMT",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6b56e1f90501bea50aedd2ea9a527952b808e1b4",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3906/mbox/",
    "series": [
        {
            "id": 946,
            "url": "https://patchwork.libcamera.org/api/1.1/series/946/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=946",
            "date": "2020-06-03T14:16:04",
            "name": "Support qv4l2 with v4l2-compat",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/946/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3906/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3906/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<paul.elder@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CC2C6114D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Jun 2020 16:16:25 +0200 (CEST)",
            "from emerald.amanokami.net (fs76eef344.knge213.ap.nuro.jp\n\t[118.238.243.68])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 179F527C;\n\tWed,  3 Jun 2020 16:16:23 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"D1oqqPGl\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1591193785;\n\tbh=zkkZ8HpwE1KadJjjp80IveswbRW2zPq0Smm8x52nocY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=D1oqqPGlRIDDGh6Y6IohlvH92L4nOYZR2zRZLOdccGNbTlz1NlC5MnMqBDh8uH952\n\tHuiah4wsrwh1HCVhZxi/iXVqEIe9VJW74ArVyXaSn761AfZ8akHzOGZU8+2Ls2Kz7j\n\tGF76OlvPgjwE2Gf7LzTS2cMhugu4NLpuduA557iw=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  3 Jun 2020 23:16:06 +0900",
        "Message-Id": "<20200603141609.18584-3-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200603141609.18584-1-paul.elder@ideasonboard.com>",
        "References": "<20200603141609.18584-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 2/5] v4l2: v4l2_camera_proxy: Fix bounds\n\tcheck for VIDIOC_ENUM_FMT",
        "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": "Wed, 03 Jun 2020 14:16:26 -0000"
    },
    "content": "VIDIOC_ENUM_FMT is meant to return -EINVAL if the requested index is out\nof bounds. This bounds is obtained from the libcamera Camera's list of\nformats. The bounds check for this list was incorrect; fix it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/v4l2/v4l2_camera_proxy.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 3df4d42b..ec6d265d 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -224,7 +224,7 @@ int V4L2CameraProxy::vidioc_enum_fmt(struct v4l2_fmtdesc *arg)\n \tLOG(V4L2Compat, Debug) << \"Servicing vidioc_enum_fmt\";\n \n \tif (!validateBufferType(arg->type) ||\n-\t    arg->index > streamConfig_.formats().pixelformats().size())\n+\t    arg->index >= streamConfig_.formats().pixelformats().size())\n \t\treturn -EINVAL;\n \n \t/* \\todo Add map from format to description. */\n",
    "prefixes": [
        "libcamera-devel",
        "2/5"
    ]
}