patch 'test: verify strdup return' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:46:20 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/31/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fbd04d26f306ad0d5357fdd1f596dc43dfcadebc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From fbd04d26f306ad0d5357fdd1f596dc43dfcadebc Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 10 Nov 2023 10:01:12 +0000
Subject: [PATCH] test: verify strdup return
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]

Add verify strdup return value logic.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Huisong Li <lihuisong at huawei.com>
---
 app/test/process.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test/process.h b/app/test/process.h
index af7bc3e0de..c576c42349 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -59,8 +59,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 		return -1;
 	else if (pid == 0) {
 		/* make a copy of the arguments to be passed to exec */
-		for (i = 0; i < numargs; i++)
+		for (i = 0; i < numargs; i++) {
 			argv_cpy[i] = strdup(argv[i]);
+			if (argv_cpy[i] == NULL)
+				rte_panic("Error dup args\n");
+		}
 		argv_cpy[i] = NULL;
 		num = numargs;

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:32.222730341 +0800
+++ 0039-test-verify-strdup-return.patch	2024-03-05 17:39:30.733566492 +0800
@@ -1 +1 @@
-From 68edcacf428994d3088afb6f5278958cc76665da Mon Sep 17 00:00:00 2001
+From fbd04d26f306ad0d5357fdd1f596dc43dfcadebc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list