Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/116941/?format=api
http://patches.dpdk.org/api/patches/116941/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/8500896f97e47a19106f792193d1b72b3468fc29.1664263264.git.gmuthukrishn@marvell.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": "<8500896f97e47a19106f792193d1b72b3468fc29.1664263264.git.gmuthukrishn@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/8500896f97e47a19106f792193d1b72b3468fc29.1664263264.git.gmuthukrishn@marvell.com", "date": "2022-09-27T07:26:09", "name": "[v2,4/7] examples/fips_validation: fix buffer size to parse JSON string", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1d31a5fbeff3bb79c5da6a7858a3c0761c765f8e", "submitter": { "id": 2301, "url": "http://patches.dpdk.org/api/people/2301/?format=api", "name": "Gowrishankar Muthukrishnan", "email": "gmuthukrishn@marvell.com" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/8500896f97e47a19106f792193d1b72b3468fc29.1664263264.git.gmuthukrishn@marvell.com/mbox/", "series": [ { "id": 24851, "url": "http://patches.dpdk.org/api/series/24851/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24851", "date": "2022-09-27T07:26:05", "name": "FIPS asymmetric validation", "version": 2, "mbox": "http://patches.dpdk.org/series/24851/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/116941/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/116941/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id F25B7A00C2;\n\tTue, 27 Sep 2022 09:26:48 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D3B40427EC;\n\tTue, 27 Sep 2022 09:26:32 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id AE1DB42B6C\n for <dev@dpdk.org>; Tue, 27 Sep 2022 09:26:30 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 28R4DOXG031831;\n Tue, 27 Sep 2022 00:26:29 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jucsq36bn-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 27 Sep 2022 00:26:29 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 27 Sep 2022 00:26:28 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Tue, 27 Sep 2022 00:26:28 -0700", "from localhost.localdomain (unknown [10.28.34.38])\n by maili.marvell.com (Postfix) with ESMTP id E186D3F7098;\n Tue, 27 Sep 2022 00:26:25 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=4LEE7wzS5vbBmNVzIoIWhjNjTpOYwNFDVSSE6gJEU4g=;\n b=fBhr17UgAmJt27mvIIuQAmTjqJm/lyAcvO5zx6oinoiEDIOKiXMVCiFBtaSW0UFp7KgC\n Rsn6pI2M76qMGxjaUYYkir8QSg3xqx2Kii9s3Cft4GfD1LFCIJsfY9A11wqxPN96IvQT\n vy9I+PeR/EaIExUV/C1C4ppg7hCyhfY3EbyAc9SKPhVn6d3AOaAXYZBWkQrdvEwOSb3N\n HqfBVI3g1JKG6byUGQdLxsYau5/4e/s+ySzykn37HSSSZ0VM+BcWiNIoFu74oEaOcpcp\n uec6uboI2MrftvKcg6WjNXm0D7jRpKRB16mW91s9IpyNCl/srAO6IzQZ7PpnymOlvxb4 Gg==", "From": "Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>", "To": "<dev@dpdk.org>", "CC": "Anoob Joseph <anoobj@marvell.com>, Fan Zhang <roy.fan.zhang@intel.com>,\n Brian Dooley <brian.dooley@intel.com>,\n Akhil Goyal <gakhil@marvell.com>, <jerinj@marvell.com>,\n Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>", "Subject": "[v2 4/7] examples/fips_validation: fix buffer size to parse JSON\n string", "Date": "Tue, 27 Sep 2022 12:56:09 +0530", "Message-ID": "\n <8500896f97e47a19106f792193d1b72b3468fc29.1664263264.git.gmuthukrishn@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<cover.1664263264.git.gmuthukrishn@marvell.com>", "References": "<cover.1664263264.git.gmuthukrishn@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "lBQACfhVEhKKfjwGx7e7FEFenosEd-Yt", "X-Proofpoint-ORIG-GUID": "lBQACfhVEhKKfjwGx7e7FEFenosEd-Yt", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1\n definitions=2022-09-27_02,2022-09-22_02,2022-06-22_01", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "In asym op, while parsing test interim info, existing buffer of size\n256 bytes is not sufficient, hence setting it to maximum that a test\nwould need.\n\nFixes: 58cc98801eb (\"examples/fips_validation: add JSON parsing\")\n\nSigned-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>\nAcked-by: Brian Dooley <brian.dooley@intel.com>\n---\n examples/fips_validation/fips_validation.c | 7 ++++---\n examples/fips_validation/fips_validation.h | 7 +++++++\n 2 files changed, 11 insertions(+), 3 deletions(-)", "diff": "diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c\nindex e755654cd0..be0634c3ac 100644\n--- a/examples/fips_validation/fips_validation.c\n+++ b/examples/fips_validation/fips_validation.c\n@@ -484,7 +484,7 @@ fips_test_parse_one_json_group(void)\n \tjson_t *param;\n \n \tif (info.interim_callbacks) {\n-\t\tchar json_value[256];\n+\t\tchar json_value[FIPS_TEST_JSON_BUF_LEN];\n \t\tfor (i = 0; info.interim_callbacks[i].key != NULL; i++) {\n \t\t\tparam = json_object_get(json_info.json_test_group,\n \t\t\t\t\tinfo.interim_callbacks[i].key);\n@@ -493,11 +493,12 @@ fips_test_parse_one_json_group(void)\n \n \t\t\tswitch (json_typeof(param)) {\n \t\t\tcase JSON_STRING:\n-\t\t\t\tsnprintf(json_value, 256, \"%s\", json_string_value(param));\n+\t\t\t\tsnprintf(json_value, sizeof(json_value), \"%s\",\n+\t\t\t\t\t\t json_string_value(param));\n \t\t\t\tbreak;\n \n \t\t\tcase JSON_INTEGER:\n-\t\t\t\tsnprintf(json_value, 255, \"%\"JSON_INTEGER_FORMAT,\n+\t\t\t\tsnprintf(json_value, sizeof(json_value), \"%\"JSON_INTEGER_FORMAT,\n \t\t\t\t\t\tjson_integer_value(param));\n \t\t\t\tbreak;\n \ndiff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h\nindex 6e5f2fce75..43e5ffe4b0 100644\n--- a/examples/fips_validation/fips_validation.h\n+++ b/examples/fips_validation/fips_validation.h\n@@ -183,6 +183,13 @@ struct xts_interim_data {\n };\n \n #ifdef USE_JANSSON\n+/*\n+ * Maximum length of buffer to hold any json string.\n+ * Esp, in asym op, modulo bits decide char buffer size.\n+ * max = (modulo / 4)\n+ */\n+#define FIPS_TEST_JSON_BUF_LEN (4096 / 4)\n+\n struct fips_test_json_info {\n \t/* Information used for reading from json */\n \tjson_t *json_root;\n", "prefixes": [ "v2", "4/7" ] }{ "id": 116941, "url": "