get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52199,
    "url": "http://patches.dpdk.org/api/patches/52199/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190403144505.46234-2-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20190403144505.46234-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190403144505.46234-2-bruce.richardson@intel.com",
    "date": "2019-04-03T14:45:01",
    "name": "[1/5] net/bonding: fix buffer length when printing strings",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a138bcd6b26b291dfdcec02324ce09fd01c76e96",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190403144505.46234-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 4091,
            "url": "http://patches.dpdk.org/api/series/4091/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4091",
            "date": "2019-04-03T14:45:00",
            "name": "clean up snprintf use for string copying",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4091/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/52199/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/52199/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 67DE41B458;\n\tWed,  3 Apr 2019 16:45:17 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 7265D1B44F;\n\tWed,  3 Apr 2019 16:45:15 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Apr 2019 07:45:14 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.222.236])\n\tby orsmga005.jf.intel.com with ESMTP; 03 Apr 2019 07:45:13 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,304,1549958400\"; d=\"scan'208\";a=\"312832701\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n\tDeclan Doherty <declan.doherty@intel.com>, stable@dpdk.org",
        "Date": "Wed,  3 Apr 2019 15:45:01 +0100",
        "Message-Id": "<20190403144505.46234-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190403144505.46234-1-bruce.richardson@intel.com>",
        "References": "<20190403144505.46234-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/5] net/bonding: fix buffer length when printing\n\tstrings",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Using the size of the source string is incorrect when printing using\nsnprintf. Instead pass in the buffer size to be used appropriately.\n\nFixes: 457ecf2953fc (\"bond: add debug info for mode 6\")\n\nCC: Declan Doherty <declan.doherty@intel.com>\nCC: stable@dpdk.org\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/net/bonding/rte_eth_bond_pmd.c | 23 ++++++++++-------------\n 1 file changed, 10 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex 58b6e4344..154257ffe 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -489,35 +489,31 @@ uint32_t burstnumberTX;\n #ifdef RTE_LIBRTE_BOND_DEBUG_ALB\n \n static void\n-arp_op_name(uint16_t arp_op, char *buf)\n+arp_op_name(uint16_t arp_op, char *buf, size_t buf_len)\n {\n \tswitch (arp_op) {\n \tcase ARP_OP_REQUEST:\n-\t\tsnprintf(buf, sizeof(\"ARP Request\"), \"%s\", \"ARP Request\");\n+\t\tsnprintf(buf, buf_len, \"%s\", \"ARP Request\");\n \t\treturn;\n \tcase ARP_OP_REPLY:\n-\t\tsnprintf(buf, sizeof(\"ARP Reply\"), \"%s\", \"ARP Reply\");\n+\t\tsnprintf(buf, buf_len, \"%s\", \"ARP Reply\");\n \t\treturn;\n \tcase ARP_OP_REVREQUEST:\n-\t\tsnprintf(buf, sizeof(\"Reverse ARP Request\"), \"%s\",\n-\t\t\t\t\"Reverse ARP Request\");\n+\t\tsnprintf(buf, buf_len, \"%s\", \"Reverse ARP Request\");\n \t\treturn;\n \tcase ARP_OP_REVREPLY:\n-\t\tsnprintf(buf, sizeof(\"Reverse ARP Reply\"), \"%s\",\n-\t\t\t\t\"Reverse ARP Reply\");\n+\t\tsnprintf(buf, buf_len, \"%s\", \"Reverse ARP Reply\");\n \t\treturn;\n \tcase ARP_OP_INVREQUEST:\n-\t\tsnprintf(buf, sizeof(\"Peer Identify Request\"), \"%s\",\n-\t\t\t\t\"Peer Identify Request\");\n+\t\tsnprintf(buf, buf_len, \"%s\", \"Peer Identify Request\");\n \t\treturn;\n \tcase ARP_OP_INVREPLY:\n-\t\tsnprintf(buf, sizeof(\"Peer Identify Reply\"), \"%s\",\n-\t\t\t\t\"Peer Identify Reply\");\n+\t\tsnprintf(buf, buf_len, \"%s\", \"Peer Identify Reply\");\n \t\treturn;\n \tdefault:\n \t\tbreak;\n \t}\n-\tsnprintf(buf, sizeof(\"Unknown\"), \"%s\", \"Unknown\");\n+\tsnprintf(buf, buf_len, \"%s\", \"Unknown\");\n \treturn;\n }\n #endif\n@@ -621,7 +617,8 @@ mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,\n \t\tarp_h = (struct arp_hdr *)((char *)(eth_h + 1) + offset);\n \t\tipv4_addr_to_dot(arp_h->arp_data.arp_sip, src_ip, MaxIPv4String);\n \t\tipv4_addr_to_dot(arp_h->arp_data.arp_tip, dst_ip, MaxIPv4String);\n-\t\tarp_op_name(rte_be_to_cpu_16(arp_h->arp_op), ArpOp);\n+\t\tarp_op_name(rte_be_to_cpu_16(arp_h->arp_op),\n+\t\t\t\tArpOp, sizeof(ArpOp));\n \t\tMODE6_DEBUG(buf, src_ip, dst_ip, eth_h, ArpOp, port, *burstnumber);\n \t}\n #endif\n",
    "prefixes": [
        "1/5"
    ]
}