patch 'app/testpmd: verify strdup return' has been queued to stable release 22.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Mar 7 02:30:48 CET 2024
Hi,
FYI, your patch has been queued to stable release 22.11.5
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/09/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://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c5b10216249ba0754f28d6b946e104dae13be2e8
Thanks.
Luca Boccassi
---
>From c5b10216249ba0754f28d6b946e104dae13be2e8 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 10 Nov 2023 10:01:15 +0000
Subject: [PATCH] app/testpmd: verify strdup return
[ upstream commit 365cdd7d01f70da2b10671aea05c5aaa036d3771 ]
Add verify strdup return value logic.
Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split")
Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Ivan Malov <ivan.malov at arknetworks.am>
Acked-by: Huisong Li <lihuisong at huawei.com>
---
app/test-pmd/cmdline.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3a451b9fa0..820332df50 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3454,6 +3454,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
nb_item = 0;
char *str2 = strdup(str);
+ if (str2 == NULL)
+ return nb_item;
cur = strtok_r(str2, ",", &tmp);
while (cur != NULL) {
parsed_items[nb_item] = get_ptype(cur);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-03-07 01:05:37.661653770 +0000
+++ 0031-app-testpmd-verify-strdup-return.patch 2024-03-07 01:05:34.734938659 +0000
@@ -1 +1 @@
-From 365cdd7d01f70da2b10671aea05c5aaa036d3771 Mon Sep 17 00:00:00 2001
+From c5b10216249ba0754f28d6b946e104dae13be2e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 365cdd7d01f70da2b10671aea05c5aaa036d3771 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 9369d3b4c5..d9304e4a32 100644
+index 3a451b9fa0..820332df50 100644
@@ -22 +23 @@
-@@ -3528,6 +3528,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
+@@ -3454,6 +3454,8 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
More information about the stable
mailing list