Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/65902/?format=api
http://patches.dpdk.org/api/patches/65902/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200219124003.1025267-1-ferruh.yigit@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": "<20200219124003.1025267-1-ferruh.yigit@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200219124003.1025267-1-ferruh.yigit@intel.com", "date": "2020-02-19T12:40:03", "name": "app/testpmd: guarantee that array access is in range", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3f2a59ac754e9e51be685acf992ebf9e8e6db478", "submitter": { "id": 324, "url": "http://patches.dpdk.org/api/people/324/?format=api", "name": "Ferruh Yigit", "email": "ferruh.yigit@intel.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200219124003.1025267-1-ferruh.yigit@intel.com/mbox/", "series": [ { "id": 8609, "url": "http://patches.dpdk.org/api/series/8609/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8609", "date": "2020-02-19T12:40:03", "name": "app/testpmd: guarantee that array access is in range", "version": 1, "mbox": "http://patches.dpdk.org/series/8609/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/65902/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/65902/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 A8499A0555;\n\tWed, 19 Feb 2020 13:40:10 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 18FBF1BF81;\n\tWed, 19 Feb 2020 13:40:10 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id EDFCD25B3\n for <dev@dpdk.org>; Wed, 19 Feb 2020 13:40:08 +0100 (CET)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2020 04:40:07 -0800", "from silpixa00399752.ir.intel.com (HELO\n silpixa00399752.ger.corp.intel.com) ([10.237.222.180])\n by orsmga003.jf.intel.com with ESMTP; 19 Feb 2020 04:40:05 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,459,1574150400\"; d=\"scan'208\";a=\"235881270\"", "From": "Ferruh Yigit <ferruh.yigit@intel.com>", "To": "Wenzhuo Lu <wenzhuo.lu@intel.com>, Jingjing Wu <jingjing.wu@intel.com>,\n Bernard Iremonger <bernard.iremonger@intel.com>,\n Herakliusz Lipiec <herakliusz.lipiec@intel.com>,\n Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>,\n Anatoly Burakov <anatoly.burakov@intel.com>", "Cc": "dev@dpdk.org,\n\tFerruh Yigit <ferruh.yigit@intel.com>", "Date": "Wed, 19 Feb 2020 12:40:03 +0000", "Message-Id": "<20200219124003.1025267-1-ferruh.yigit@intel.com>", "X-Mailer": "git-send-email 2.24.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] app/testpmd: guarantee that array access is in\n\trange", "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": "Coverity complains about out of bound access, which is a false positive.\n\nThe return value of the 'parse_port_list()' can't be bigger than\n'maxsize' because of the logic in the function. ('value >= (int)maxsize'\ncheck and 'marked[]' usage.)\n\nBut this is not explicitly clear, causing coverity warning and same\nquestion can be rise by reviews later.\n\nAdding a redundant check to highlight the access is in range, this is\ndone by replacing existing redundant check.\n\nThis is also good to protect against out out bound access in case\n'parse_port_list()' behaviour changes later unexpectedly.\n\nCoverity issue: 354229\nFixes: 2df00d562d20 (\"app/testpmd: add --portlist option\")\n\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\n---\n app/test-pmd/config.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 9d9520223..d93941f03 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -2703,7 +2703,7 @@ parse_fwd_portlist(const char *portlist)\n \t * and thereby calculate the total number of\n \t * valid ports\n \t */\n-\tfor (i = 0; i < portcount && valid_port_count < portcount; i++) {\n+\tfor (i = 0; i < portcount && i < RTE_DIM(portindex); i++) {\n \t\tif (rte_eth_dev_is_valid_port(portindex[i])) {\n \t\t\tportindex[valid_port_count] = portindex[i];\n \t\t\tvalid_port_count++;\n", "prefixes": [] }{ "id": 65902, "url": "