Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/16967/?format=api
https://patches.dpdk.org/api/patches/16967/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1478528466-211016-1-git-send-email-roy.fan.zhang@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": "<1478528466-211016-1-git-send-email-roy.fan.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1478528466-211016-1-git-send-email-roy.fan.zhang@intel.com", "date": "2016-11-07T14:21:06", "name": "[dpdk-dev,v2] examples/ipsec-secgw: fix copy into fixed size buffer issue", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d6604e11bbd42790547feb7cb68eb8173629ee5d", "submitter": { "id": 304, "url": "https://patches.dpdk.org/api/people/304/?format=api", "name": "Fan Zhang", "email": "roy.fan.zhang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1478528466-211016-1-git-send-email-roy.fan.zhang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/16967/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/16967/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 2FBCC2A5E;\n\tMon, 7 Nov 2016 15:21:12 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id BDEE01E33\n\tfor <dev@dpdk.org>; Mon, 7 Nov 2016 15:21:08 +0100 (CET)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga105.fm.intel.com with ESMTP; 07 Nov 2016 06:21:07 -0800", "from sie-lab-212-071.ir.intel.com (HELO\n\tsilpixa00381633.ir.intel.com) ([10.237.212.71])\n\tby fmsmga005.fm.intel.com with ESMTP; 07 Nov 2016 06:21:06 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.31,606,1473145200\"; d=\"scan'208\";a=\"28378598\"", "From": "Fan Zhang <roy.fan.zhang@intel.com>", "To": "dev@dpdk.org", "Cc": "sergio.gonzalez.monroy@intel.com", "Date": "Mon, 7 Nov 2016 14:21:06 +0000", "Message-Id": "<1478528466-211016-1-git-send-email-roy.fan.zhang@intel.com>", "X-Mailer": "git-send-email 2.5.5", "In-Reply-To": "<1478175163-229116-3-git-send-email-roy.fan.zhang@intel.com>", "References": "<1478175163-229116-3-git-send-email-roy.fan.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix copy into fixed\n\tsize buffer issue", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <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": "Fixes: 0d547ed0 (\"examples/ipsec-secgw: support configuration\nfile\")\nCoverity issue: 137875\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n examples/ipsec-secgw/sa.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)", "diff": "diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c\nindex 9e2c8a9..8c4406c 100644\n--- a/examples/ipsec-secgw/sa.c\n+++ b/examples/ipsec-secgw/sa.c\n@@ -170,15 +170,18 @@ static uint32_t\n parse_key_string(const char *key_str, uint8_t *key)\n {\n \tconst char *pt_start = key_str, *pt_end = key_str;\n-\tchar sub_str[3];\n \tuint32_t nb_bytes = 0;\n \n \twhile (pt_end != NULL) {\n+\t\tchar sub_str[3] = {0};\n+\n \t\tpt_end = strchr(pt_start, ':');\n \n-\t\tif (pt_end == NULL)\n-\t\t\tstrncpy(sub_str, pt_start, strlen(pt_start));\n-\t\telse {\n+\t\tif (pt_end == NULL) {\n+\t\t\tif (strlen(pt_start) > 2)\n+\t\t\t\treturn 0;\n+\t\t\tstrncpy(sub_str, pt_start, 2);\n+\t\t} else {\n \t\t\tif (pt_end - pt_start > 2)\n \t\t\t\treturn 0;\n \n", "prefixes": [ "dpdk-dev", "v2" ] }{ "id": 16967, "url": "