get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 84633,
    "url": "https://patches.dpdk.org/api/patches/84633/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201129175437.15346-5-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20201129175437.15346-5-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201129175437.15346-5-stephen@networkplumber.org",
    "date": "2020-11-29T17:54:36",
    "name": "[4/5] misc: fix compiler warning in ifstat and nstat",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "fb830ef7d65c85b97ebe8587ccbb4ad25eba17f6",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201129175437.15346-5-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 14141,
            "url": "https://patches.dpdk.org/api/series/14141/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14141",
            "date": "2020-11-29T17:54:32",
            "name": "fix warnings from gcc-10",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14141/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/84633/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/84633/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CFA57A04E7;\n\tSun, 29 Nov 2020 18:56:14 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 16055C9C4;\n\tSun, 29 Nov 2020 18:55:06 +0100 (CET)",
            "from mail-pf1-f196.google.com (mail-pf1-f196.google.com\n [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 07E43C97A\n for <dev@dpdk.org>; Sun, 29 Nov 2020 18:54:58 +0100 (CET)",
            "by mail-pf1-f196.google.com with SMTP id 131so8838816pfb.9\n for <dev@dpdk.org>; Sun, 29 Nov 2020 09:54:57 -0800 (PST)",
            "from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id l23sm13114850pgn.40.2020.11.29.09.54.54\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 29 Nov 2020 09:54:55 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=d+CBUwikwpql5D28/Ydzn/tkpCccjAYgynX4fCid50M=;\n b=xN/X9zn4oIUiO/HSRu7hnzwnOBfV+4k2sw2LGVLsPti+a6omkIJxOWKf3s7dH1Shsd\n QYnh46SU3V3oSFbaTtM3SlxKzPcs0DW6JUNHMLKh7t++8n1hTG0/wlijMStShxOiHxnR\n y1pM7sg4/A2ZWUdhRgDcq+Peb8k0kGPr2Iix9xONgW2/8kU/IfD1dUAZ8xUoiw874iyk\n 4G+n/itzyYfmLmCW428gj+sDMW7kYaC1QELdiM/NcsbY0dAzrEznYnVu5bS1IyU29R92\n HD1n4vFyCn0kM0SJcqsM7B5buCi2mlsXe/5pTC6rEXnaneWQ7OCpkE8dlY1YqcINIodg\n oqAQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=d+CBUwikwpql5D28/Ydzn/tkpCccjAYgynX4fCid50M=;\n b=RrUe+ztd2vV+OV4Lb+AJbNIT7+7/HKXaO4EScx5Bo0CNlVhkDPRvSIDro5xKEpGxPj\n DgdTxpvWD9Q3cRYf+dcLxuc8xZkbVQilFoBBnRmT0HQB1VdoYEI+IFY3mLc3DWYBq30L\n pgejx2nXlZcjw+UOptPhha9dWvuWgrndLf4chf1ypb2CvZ0cegxvKMVK/EEpyRIXt3BO\n QFYu8oQ4hvREGc+3YlHHaW17zI6WLhXh6Hk9hw/EBprUVMg7GR0E0DpxyTDwthlL53Ml\n COy/c8KGVNKaLXls/qH1E462oYdwYjfcdWImigCJye00u9ur2gKhIAbxdBpfQmVCiHK/\n 8b7w==",
        "X-Gm-Message-State": "AOAM531cvL3wLGCvB5wBwNDjBFKfrky6Z7l3vjxkVNU9bKOm+eiocI8R\n 63ID+5lBH2DPVsrZ+vFQSQlK/08ZCXfkrKDI",
        "X-Google-Smtp-Source": "\n ABdhPJzZki1Y2Y87Lh9IVBi4Q7jP08af5B00xuCu8ELdDDrUAVmg7/rI1IOpQe9k8lIs+yNWaBICSQ==",
        "X-Received": "by 2002:a17:90b:4785:: with SMTP id\n hz5mr4035335pjb.157.1606672495765;\n Sun, 29 Nov 2020 09:54:55 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Sun, 29 Nov 2020 09:54:36 -0800",
        "Message-Id": "<20201129175437.15346-5-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20201129175437.15346-1-stephen@networkplumber.org>",
        "References": "<20201129175437.15346-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 4/5] misc: fix compiler warning in ifstat and\n\tnstat",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The code here was doing strncpy() in a way that causes gcc 10\nwarning about possible string overflow. Just use strlcpy() which\nwill null terminate and bound the string as expected.\n\nThis has existed since start of git era so no Fixes tag.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n misc/ifstat.c | 2 +-\n misc/nstat.c  | 3 +--\n 2 files changed, 2 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/misc/ifstat.c b/misc/ifstat.c\nindex c05183d79a13..d4a33429dc50 100644\n--- a/misc/ifstat.c\n+++ b/misc/ifstat.c\n@@ -251,7 +251,7 @@ static void load_raw_table(FILE *fp)\n \t\t\tbuf[strlen(buf)-1] = 0;\n \t\t\tif (info_source[0] && strcmp(info_source, buf+1))\n \t\t\t\tsource_mismatch = 1;\n-\t\t\tstrncpy(info_source, buf+1, sizeof(info_source)-1);\n+\t\t\tstrlcpy(info_source, buf+1, sizeof(info_source));\n \t\t\tcontinue;\n \t\t}\n \t\tif ((n = malloc(sizeof(*n))) == NULL)\ndiff --git a/misc/nstat.c b/misc/nstat.c\nindex 6fdd316cce84..ecdd4ce8266d 100644\n--- a/misc/nstat.c\n+++ b/misc/nstat.c\n@@ -136,8 +136,7 @@ static void load_good_table(FILE *fp)\n \t\t\tbuf[strlen(buf)-1] = 0;\n \t\t\tif (info_source[0] && strcmp(info_source, buf+1))\n \t\t\t\tsource_mismatch = 1;\n-\t\t\tinfo_source[0] = 0;\n-\t\t\tstrncat(info_source, buf+1, sizeof(info_source)-1);\n+\t\t\tstrlcpy(info_source, buf + 1, sizeof(info_source));\n \t\t\tcontinue;\n \t\t}\n \t\t/* idbuf is as big as buf, so this is safe */\n",
    "prefixes": [
        "4/5"
    ]
}