get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134240,
    "url": "http://patches.dpdk.org/api/patches/134240/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231114084133.3573959-9-haijie1@huawei.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": "<20231114084133.3573959-9-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231114084133.3573959-9-haijie1@huawei.com",
    "date": "2023-11-14T08:41:19",
    "name": "[v2,08/22] app/test-mldev: replace strtok with reentrant version",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "4afee815aa7c4f092e2f78e85fe237f3038f522e",
    "submitter": {
        "id": 2935,
        "url": "http://patches.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@huawei.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/20231114084133.3573959-9-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 30286,
            "url": "http://patches.dpdk.org/api/series/30286/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30286",
            "date": "2023-11-14T08:41:12",
            "name": "replace strtok with reentrant version",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30286/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134240/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134240/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2EC1143325;\n\tTue, 14 Nov 2023 09:48:04 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ADD2840A79;\n\tTue, 14 Nov 2023 09:47:24 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id B3BF3402F2\n for <dev@dpdk.org>; Tue, 14 Nov 2023 09:47:15 +0100 (CET)",
            "from kwepemd100004.china.huawei.com (unknown [172.30.72.57])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SV0KG6r1KzvQH1;\n Tue, 14 Nov 2023 16:46:58 +0800 (CST)",
            "from localhost.localdomain (10.67.165.2) by\n kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.2.1258.23; Tue, 14 Nov 2023 16:47:13 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "<dev@dpdk.org>, Srikanth Yalavarthi <syalavarthi@marvell.com>",
        "CC": "<haijie1@huawei.com>, <lihuisong@huawei.com>, <fengchengwen@huawei.com>",
        "Subject": "[PATCH v2 08/22] app/test-mldev: replace strtok with reentrant\n version",
        "Date": "Tue, 14 Nov 2023 16:41:19 +0800",
        "Message-ID": "<20231114084133.3573959-9-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20231114084133.3573959-1-haijie1@huawei.com>",
        "References": "<20231113104550.2138654-1-haijie1@huawei.com>\n <20231114084133.3573959-1-haijie1@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.2]",
        "X-ClientProxiedBy": "dggems701-chm.china.huawei.com (10.3.19.178) To\n kwepemd100004.china.huawei.com (7.221.188.31)",
        "X-CFilter-Loop": "Reflected",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "Multiple threads calling the same function may cause condition\nrace issues, which often leads to abnormal behavior and can cause\nmore serious vulnerabilities such as abnormal termination, denial\nof service, and compromised data integrity.\n\nThe strtok() is non-reentrant, it is better to replace it with a\nreentrant version.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test-mldev/ml_options.c | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/app/test-mldev/ml_options.c b/app/test-mldev/ml_options.c\nindex 72357c1c393d..3e93a8b7356c 100644\n--- a/app/test-mldev/ml_options.c\n+++ b/app/test-mldev/ml_options.c\n@@ -75,12 +75,12 @@ ml_parse_models(struct ml_options *opt, const char *arg)\n {\n \tconst char *delim = \",\";\n \tchar models[PATH_MAX];\n-\tchar *token;\n+\tchar *token, *sp = NULL;\n \tint ret = 0;\n \n \tstrlcpy(models, arg, PATH_MAX);\n \n-\ttoken = strtok(models, delim);\n+\ttoken = strtok_s(models, delim, &sp);\n \twhile (token != NULL) {\n \t\tstrlcpy(opt->filelist[opt->nb_filelist].model, token, PATH_MAX);\n \t\topt->nb_filelist++;\n@@ -90,7 +90,7 @@ ml_parse_models(struct ml_options *opt, const char *arg)\n \t\t\tret = -EINVAL;\n \t\t\tbreak;\n \t\t}\n-\t\ttoken = strtok(NULL, delim);\n+\t\ttoken = strtok_s(NULL, delim, &sp);\n \t}\n \n \tif (opt->nb_filelist == 0) {\n@@ -106,7 +106,7 @@ ml_parse_filelist(struct ml_options *opt, const char *arg)\n {\n \tconst char *delim = \",\";\n \tchar filelist[PATH_MAX];\n-\tchar *token;\n+\tchar *token, *sp = NULL;\n \n \tif (opt->nb_filelist >= ML_TEST_MAX_MODELS) {\n \t\tml_err(\"Exceeded filelist count, max = %d\\n\", ML_TEST_MAX_MODELS);\n@@ -116,7 +116,7 @@ ml_parse_filelist(struct ml_options *opt, const char *arg)\n \tstrlcpy(filelist, arg, PATH_MAX);\n \n \t/* model */\n-\ttoken = strtok(filelist, delim);\n+\ttoken = strtok_s(filelist, delim, &sp);\n \tif (token == NULL) {\n \t\tml_err(\"Invalid filelist, model not specified = %s\\n\", arg);\n \t\treturn -EINVAL;\n@@ -124,7 +124,7 @@ ml_parse_filelist(struct ml_options *opt, const char *arg)\n \tstrlcpy(opt->filelist[opt->nb_filelist].model, token, PATH_MAX);\n \n \t/* input */\n-\ttoken = strtok(NULL, delim);\n+\ttoken = strtok_s(NULL, delim, &sp);\n \tif (token == NULL) {\n \t\tml_err(\"Invalid filelist, input not specified = %s\\n\", arg);\n \t\treturn -EINVAL;\n@@ -132,7 +132,7 @@ ml_parse_filelist(struct ml_options *opt, const char *arg)\n \tstrlcpy(opt->filelist[opt->nb_filelist].input, token, PATH_MAX);\n \n \t/* output */\n-\ttoken = strtok(NULL, delim);\n+\ttoken = strtok_s(NULL, delim, &sp);\n \tif (token == NULL) {\n \t\tml_err(\"Invalid filelist, output not specified = %s\\n\", arg);\n \t\treturn -EINVAL;\n@@ -140,14 +140,14 @@ ml_parse_filelist(struct ml_options *opt, const char *arg)\n \tstrlcpy(opt->filelist[opt->nb_filelist].output, token, PATH_MAX);\n \n \t/* reference - optional */\n-\ttoken = strtok(NULL, delim);\n+\ttoken = strtok_s(NULL, delim, &sp);\n \tif (token != NULL)\n \t\tstrlcpy(opt->filelist[opt->nb_filelist].reference, token, PATH_MAX);\n \telse\n \t\tmemset(opt->filelist[opt->nb_filelist].reference, 0, PATH_MAX);\n \n \t/* check for extra tokens */\n-\ttoken = strtok(NULL, delim);\n+\ttoken = strtok_s(NULL, delim, &sp);\n \tif (token != NULL) {\n \t\tml_err(\"Invalid filelist. Entries > 4\\n.\");\n \t\treturn -EINVAL;\n",
    "prefixes": [
        "v2",
        "08/22"
    ]
}