Show a patch.

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

{
    "id": 74570,
    "url": "https://patches.dpdk.org/api/patches/74570/",
    "web_url": "https://patches.dpdk.org/patch/74570/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1595332952-7035-1-git-send-email-michaelba@mellanox.com>",
    "date": "2020-07-21T12:02:32",
    "name": "net/mlx5: fix unlimited scan in switch info detection",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c46f53a0ca06a0f72bdabc124d39ce3e89180c7d",
    "submitter": {
        "id": 1582,
        "url": "https://patches.dpdk.org/api/people/1582/",
        "name": "Michael Baum",
        "email": "michaelba@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@mellanox.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74570/mbox/",
    "series": [
        {
            "id": 11207,
            "url": "https://patches.dpdk.org/api/series/11207/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11207",
            "date": "2020-07-21T12:02:32",
            "name": "net/mlx5: fix unlimited scan in switch info detection",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11207/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74570/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74570/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH] net/mlx5: fix unlimited scan in switch info\n\tdetection",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Michael Baum <michaelba@mellanox.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A68F7A0526;\n\tTue, 21 Jul 2020 14:02:40 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 7C44F1BFEF;\n\tTue, 21 Jul 2020 14:02:40 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 541BA1BFEE\n for <dev@dpdk.org>; Tue, 21 Jul 2020 14:02:39 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@mellanox.com) with SMTP; 21 Jul 2020 15:02:34 +0300",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n [10.210.16.112])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06LC2YM5025565;\n Tue, 21 Jul 2020 15:02:34 +0300"
        ],
        "To": "dev@dpdk.org",
        "X-Mailer": "git-send-email 1.8.3.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Tue, 21 Jul 2020 12:02:32 +0000",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "matan@mellanox.com, viacheslavo@mellanox.com, stable@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<1595332952-7035-1-git-send-email-michaelba@mellanox.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "In mlx5_sysfs_switch_info function, the driver gets switch information\nassociated with network interface.\n\nThe driver writes the port name into buffer and translates it.\nHowever, when it writes the name, it does not limit writing to the\nbuffer size.\n\nLimit writing to the size of the buffer.\n\nFixes: 1256805dd54d (\"net/mlx5: move Linux-specific functions\")\nCc: stable@dpdk.org\n\nSigned-off-by: Michael Baum <michaelba@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c\nindex 1735157..3d3dd2e 100644\n--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c\n@@ -1067,7 +1067,7 @@ struct ethtool_link_settings {\n \n \tfile = fopen(phys_port_name, \"rb\");\n \tif (file != NULL) {\n-\t\tret = fscanf(file, \"%s\", port_name);\n+\t\tret = fscanf(file, \"%\" RTE_STR(IF_NAMESIZE) \"s\", port_name);\n \t\tfclose(file);\n \t\tif (ret == 1)\n \t\t\tmlx5_translate_port_name(port_name, &data);\n",
    "prefixes": []
}