Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/29535/?format=api
https://patches.dpdk.org/api/patches/29535/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1507031282-12469-1-git-send-email-kubax.kozak@intel.com/", "project": { "id": 1, "url": "https://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": "<1507031282-12469-1-git-send-email-kubax.kozak@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1507031282-12469-1-git-send-email-kubax.kozak@intel.com", "date": "2017-10-03T11:48:02", "name": "[dpdk-dev] l3fwd-acl: fix unchecked return value", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "10e32bac49c6b42ea2e14501c8f9de8dbb4fe8c6", "submitter": { "id": 666, "url": "https://patches.dpdk.org/api/people/666/?format=api", "name": "Kuba Kozak", "email": "kubax.kozak@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1507031282-12469-1-git-send-email-kubax.kozak@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/29535/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/29535/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 9AD5D1B394;\n\tTue, 3 Oct 2017 13:52:33 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 3127F1B350;\n\tTue, 3 Oct 2017 13:52:32 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Oct 2017 04:52:30 -0700", "from gklab-246-072.igk.intel.com (HELO Sent) ([10.217.246.72])\n\tby fmsmga001.fm.intel.com with SMTP; 03 Oct 2017 04:52:28 -0700", "by Sent (sSMTP sendmail emulation); Tue, 03 Oct 2017 13:48:04 +0200" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.42,474,1500966000\"; d=\"scan'208\";\n\ta=\"1201632830\"", "From": "Kuba Kozak <kubax.kozak@intel.com>", "To": "konstantin.ananyev@intel.com", "Cc": "dev@dpdk.org,\n\tKuba Kozak <kubax.kozak@intel.com>,\n\tstable@dpdk.org", "Date": "Tue, 3 Oct 2017 13:48:02 +0200", "Message-Id": "<1507031282-12469-1-git-send-email-kubax.kozak@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://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": "<http://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": "Add return value check and error handling for fseek call.\n\nCoverity issue: 143435\nFixes: 361b2e9559fc (\"acl: new sample l3fwd-acl\")\nCc: konstantin.ananyev@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Kuba Kozak <kubax.kozak@intel.com>\nAcked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n examples/l3fwd-acl/main.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)", "diff": "diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c\nindex 8eff4de..708e9eb 100644\n--- a/examples/l3fwd-acl/main.c\n+++ b/examples/l3fwd-acl/main.c\n@@ -1026,6 +1026,7 @@ add_rules(const char *rule_path,\n \tchar buff[LINE_MAX];\n \tFILE *fh = fopen(rule_path, \"rb\");\n \tunsigned int i = 0;\n+\tint val;\n \n \tif (fh == NULL)\n \t\trte_exit(EXIT_FAILURE, \"%s: Open %s failed\\n\", __func__,\n@@ -1042,7 +1043,11 @@ add_rules(const char *rule_path,\n \t\trte_exit(EXIT_FAILURE, \"Not find any route entries in %s!\\n\",\n \t\t\t\trule_path);\n \n-\tfseek(fh, 0, SEEK_SET);\n+\tval = fseek(fh, 0, SEEK_SET);\n+\tif (val < 0) {\n+\t\trte_exit(EXIT_FAILURE, \"%s: File seek operation failed\\n\",\n+\t\t\t__func__);\n+\t}\n \n \tacl_rules = calloc(acl_num, rule_size);\n \n", "prefixes": [ "dpdk-dev" ] }{ "id": 29535, "url": "