From: Chaoyong He <chaoyong.he@corigine.com>
To: Chengwen Feng <fengchengwen@huawei.com>,
"thomas@monjalon.net" <thomas@monjalon.net>,
"ferruh.yigit@amd.com" <ferruh.yigit@amd.com>,
Chang Miao <chang.miao@nephogine.com>,
Shihong Wang <shihong.wang@nephogine.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH 08/16] net/nfp: verify strdup return value
Date: Fri, 10 Nov 2023 06:58:32 +0000 [thread overview]
Message-ID: <SJ0PR13MB5545ACDAA6F7942C9D905A7D9EAEA@SJ0PR13MB5545.namprd13.prod.outlook.com> (raw)
In-Reply-To: <20231110063653.5948-9-fengchengwen@huawei.com>
> [You don't often get email from fengchengwen@huawei.com. Learn why this
> is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Add verify strdup return value logic.
>
> Fixes: 3d21da66c06b ("net/nfp: create security session")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> drivers/net/nfp/nfp_ipsec.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/nfp/nfp_ipsec.c b/drivers/net/nfp/nfp_ipsec.c index
> 452947380e..7ce9cca0b2 100644
> --- a/drivers/net/nfp/nfp_ipsec.c
> +++ b/drivers/net/nfp/nfp_ipsec.c
> @@ -524,6 +524,11 @@ nfp_aesgcm_iv_update(struct ipsec_add_sa *cfg,
> uint8_t *cfg_iv;
>
> iv_str = strdup(iv_string);
> + if (iv_str == NULL) {
> + PMD_DRV_LOG(ERR, "Failed to strdup iv_string");
> + return;
> + }
> +
> cfg_iv = (uint8_t *)cfg->aesgcm_fields.iv;
>
> for (i = 0; i < iv_len; i++) {
> --
> 2.17.1
Looks good tome.
Thanks.
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
next prev parent reply other threads:[~2023-11-10 6:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 6:36 [PATCH 00/16] " Chengwen Feng
2023-11-10 6:36 ` [PATCH 01/16] eal: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 02/16] bus/dpaa: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 03/16] bus/fslmc: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 04/16] bus/vdev: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 05/16] dma/idxd: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 06/16] event/cnxk: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 07/16] net/failsafe: fix memory leak when parse args Chengwen Feng
2023-11-10 6:36 ` [PATCH 08/16] net/nfp: verify strdup return value Chengwen Feng
2023-11-10 6:58 ` Chaoyong He [this message]
2023-11-10 6:36 ` [PATCH 09/16] app/dumpcap: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 10/16] app/pdump: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 11/16] app/test: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 12/16] app/test-crypto-perf: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 13/16] app/test-dma-perf: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 14/16] app/testpmd: " Chengwen Feng
2023-11-10 6:36 ` [PATCH 15/16] examples/qos_sched: fix memory leak when parse args Chengwen Feng
2023-11-10 6:36 ` [PATCH 16/16] examples/vhost: verify strdup return value Chengwen Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR13MB5545ACDAA6F7942C9D905A7D9EAEA@SJ0PR13MB5545.namprd13.prod.outlook.com \
--to=chaoyong.he@corigine.com \
--cc=chang.miao@nephogine.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=shihong.wang@nephogine.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).