Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52391/?format=api
http://patches.dpdk.org/api/patches/52391/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190408094640.46030-5-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": "<20190408094640.46030-5-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190408094640.46030-5-bruce.richardson@intel.com", "date": "2019-04-08T09:46:39", "name": "[v3,4/5] app/testpmd: fix variable use before NULL check", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b409da3581972cb2b54abfee5ab83c7b57359313", "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/20190408094640.46030-5-bruce.richardson@intel.com/mbox/", "series": [ { "id": 4162, "url": "http://patches.dpdk.org/api/series/4162/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4162", "date": "2019-04-08T09:46:35", "name": "some small fixes", "version": 3, "mbox": "http://patches.dpdk.org/series/4162/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/52391/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/52391/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 A08255589;\n\tMon, 8 Apr 2019 11:47:10 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id DB46C54AE;\n\tMon, 8 Apr 2019 11:47:07 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Apr 2019 02:47:07 -0700", "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.222.236])\n\tby orsmga001.jf.intel.com with ESMTP; 08 Apr 2019 02:47:05 -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,324,1549958400\"; d=\"scan'208\";a=\"221512873\"", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>, wei.dai@intel.com,\n\tstable@dpdk.org, Bernard Iremonger <bernard.iremonger@intel.com>,\n\tWenzhuo Lu <wenzhuo.lu@intel.com>, Rami Rosen <ramirose@gmail.com>", "Date": "Mon, 8 Apr 2019 10:46:39 +0100", "Message-Id": "<20190408094640.46030-5-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190408094640.46030-1-bruce.richardson@intel.com>", "References": "<20190405134511.49066-1-bruce.richardson@intel.com>\n\t<20190408094640.46030-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 4/5] app/testpmd: fix variable use before NULL\n\tcheck", "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": "The value returned from rte_eth_dev_tx_offload_name() function is used\nfor string comparison before being checked for NULL. Move the NULL check\nup to be done first.\n\nCoverity issue: 279438\nFixes: c73a9071877a (\"app/testpmd: add commands to test new offload API\")\nCc: wei.dai@intel.com\nCc: stable@dpdk.org\nCc: Bernard Iremonger <bernard.iremonger@intel.com>\nCc: Wenzhuo Lu <wenzhuo.lu@intel.com>\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Rami Rosen <ramirose@gmail.com>\n---\n app/test-pmd/cmdline.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 2ab03c111..391bc8097 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -18311,13 +18311,13 @@ search_tx_offload(const char *name)\n \tsingle_offload = 1;\n \tfor (bit = 0; bit < sizeof(single_offload) * CHAR_BIT; bit++) {\n \t\tsingle_name = rte_eth_dev_tx_offload_name(single_offload);\n+\t\tif (single_name == NULL)\n+\t\t\tbreak;\n \t\tif (!strcasecmp(single_name, name)) {\n \t\t\tfound = 1;\n \t\t\tbreak;\n \t\t} else if (!strcasecmp(single_name, \"UNKNOWN\"))\n \t\t\tbreak;\n-\t\telse if (single_name == NULL)\n-\t\t\tbreak;\n \t\tsingle_offload <<= 1;\n \t}\n \n", "prefixes": [ "v3", "4/5" ] }{ "id": 52391, "url": "