Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/39432/?format=api
http://patches.dpdk.org/api/patches/39432/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/152575377810.56689.13705223191364412484.stgit@localhost.localdomain/", "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": "<152575377810.56689.13705223191364412484.stgit@localhost.localdomain>", "list_archive_url": "https://inbox.dpdk.org/dev/152575377810.56689.13705223191364412484.stgit@localhost.localdomain", "date": "2018-05-08T04:29:38", "name": "[dpdk-dev,02/18] drivers: bus: pci: fix strncpy dangerous code", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "45954f872990341b71baaa81233f0ea408ff5a09", "submitter": { "id": 1029, "url": "http://patches.dpdk.org/api/people/1029/?format=api", "name": "Andy Green", "email": "andy@warmcat.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/152575377810.56689.13705223191364412484.stgit@localhost.localdomain/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/39432/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/39432/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 1C628493D;\n\tTue, 8 May 2018 06:30:05 +0200 (CEST)", "from mail.warmcat.com (mail.warmcat.com [163.172.24.82])\n\tby dpdk.org (Postfix) with ESMTP id 13473374E\n\tfor <dev@dpdk.org>; Tue, 8 May 2018 06:29:59 +0200 (CEST)" ], "From": "Andy Green <andy@warmcat.com>", "To": "dev@dpdk.org", "Date": "Tue, 08 May 2018 12:29:38 +0800", "Message-ID": "<152575377810.56689.13705223191364412484.stgit@localhost.localdomain>", "In-Reply-To": "<152575364588.56689.3300796065057551728.stgit@localhost.localdomain>", "References": "<152575364588.56689.3300796065057551728.stgit@localhost.localdomain>", "User-Agent": "StGit/unknown-version", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 02/18] drivers: bus: pci: fix strncpy dangerous\n\tcode", "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "In function ‘pci_get_kernel_driver_by_path’,\n inlined from ‘pci_scan_one.isra.1’ at /home/agreen/projects/dpdk/drivers/bus/pci/linux/pci.c:317:8:\n/home/agreen/projects/dpdk/drivers/bus/pci/linux/pci.c:57:3: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]\n strncpy(dri_name, name + 1, strlen(name + 1) + 1);\n---\n drivers/bus/pci/linux/pci.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c\nindex 4630a8057..b5bdfd33e 100644\n--- a/drivers/bus/pci/linux/pci.c\n+++ b/drivers/bus/pci/linux/pci.c\n@@ -54,7 +54,8 @@ pci_get_kernel_driver_by_path(const char *filename, char *dri_name)\n \n \tname = strrchr(path, '/');\n \tif (name) {\n-\t\tstrncpy(dri_name, name + 1, strlen(name + 1) + 1);\n+\t\tstrncpy(dri_name, name + 1, sizeof(dri_name) - 1);\n+\t\tdri_name[sizeof(dri_name) - 1] = '\\0';\n \t\treturn 0;\n \t}\n \n", "prefixes": [ "dpdk-dev", "02/18" ] }{ "id": 39432, "url": "