Show a patch.

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

{
    "id": 9796,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/9796/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9796/",
    "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": "<20200924183642.7674-2-email@uajain.com>",
    "date": "2020-09-24T18:36:41",
    "name": "[libcamera-devel,v2,1/2] android: jpeg: exif: Pad extra byte only for ASCII format in setString()",
    "commit_ref": "51bfc823921095b301a6c68e9e59d8cb4e2ffc2d",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c18dbc55766e2a1069625b447944f54c24daef32",
    "submitter": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/people/1/?format=api",
        "name": "Umang Jain",
        "email": "email@uajain.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9796/mbox/",
    "series": [
        {
            "id": 1324,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1324/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1324",
            "date": "2020-09-24T18:36:40",
            "name": "android: jpeg: exif: Set timezone information",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1324/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9796/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9796/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 5FE78C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Sep 2020 18:37:01 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B3EC62F4F;\n\tThu, 24 Sep 2020 20:37:00 +0200 (CEST)",
            "from mail.uajain.com (static.126.159.217.95.clients.your-server.de\n\t[95.217.159.126])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CC3662F4F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Sep 2020 20:36:58 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"OuYuaTmK\"; dkim-atps=neutral",
        "From": "Umang Jain <email@uajain.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail;\n\tt=1600972618; bh=v+T2p+UETjllPjGohbyeiUXogk8kOItTOBlRt9UXl50=;\n\th=From:To:Cc:Subject:In-Reply-To:References;\n\tb=OuYuaTmKh33wP0DXmEfeGU1SeOpPFQ65K+4z1F2wba9qERVP32a5rg2zJD5SGgmxy\n\taZkT8iZEYksVY4HFHnDPQkKYeNVATbD0HPWMkm9G9q+Wa9N6mPJrZ+np2n+HAGHmVS\n\tRzjYn3wH5l0HXkkqVHgEe/rv6Df1634ibJggHumuesRe/mDSlro8r1oSS6omA/Mf5s\n\tgSq0QzUhdgr9wycAOtHpsR3CS6r36uuqGOYjUI5DfdJ9Pp3n6bMBQKcNpox1dn1m2t\n\t9bhinAxO5a6yC14fis0K+JoXzx4hJhRHFSffIKDn/bs6lOfiE25tpBgaPsFIBvgTfh\n\tr/wgZcIxX+xJA==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 25 Sep 2020 00:06:41 +0530",
        "Message-Id": "<20200924183642.7674-2-email@uajain.com>",
        "In-Reply-To": "<20200924183642.7674-1-email@uajain.com>",
        "References": "<20200924183642.7674-1-email@uajain.com>",
        "Mime-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 1/2] android: jpeg: exif: Pad extra\n\tbyte only for ASCII format in setString()",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The EXIF standard states that EXIF_FORMAT_UNDEFINED shall not be\nterminated with NULL. The patch implements this particular detail and\npad one extra byte for EXIF_FORMAT_ASCII to null-terminate strings.\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/android/jpeg/exif.cpp | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\nindex c0dbfcc..a5674b3 100644\n--- a/src/android/jpeg/exif.cpp\n+++ b/src/android/jpeg/exif.cpp\n@@ -157,8 +157,9 @@ void Exif::setRational(ExifIfd ifd, ExifTag tag, ExifRational item)\n \n void Exif::setString(ExifIfd ifd, ExifTag tag, ExifFormat format, const std::string &item)\n {\n-\t/* Pad 1 extra byte for null-terminated string. */\n-\tsize_t length = item.length() + 1;\n+\t/* Pad 1 extra byte for null-terminated string in ASCII format. */\n+\tsize_t length = format == EXIF_FORMAT_ASCII ?\n+\t\t\titem.length() + 1 : item.length();\n \n \tExifEntry *entry = createEntry(ifd, tag, format, length, length);\n \tif (!entry)\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/2"
    ]
}