From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BCF8543C60 for ; Thu, 7 Mar 2024 02:34:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB7A442E64; Thu, 7 Mar 2024 02:34:08 +0100 (CET) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id 6EFDF40E5A for ; Thu, 7 Mar 2024 02:34:07 +0100 (CET) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33e17fc5aceso891465f8f.0 for ; Wed, 06 Mar 2024 17:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709775247; x=1710380047; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y/NJBCN96he9LhIIVPxGUKB/ZkCQFYv6Jo/gkDDbhf8=; b=lgpq2ZZ3FlAUh/fLGxJEdh2+O1JnvAIff3/QBJINCEt2RvAiG+qWO2QIxlkSvFi+AX b0A3EmJSujVrD6QvfigUzfwkp876j7Kr+JpWbp2jsi9Cnfi5vWWd1VMt1iQQf2eTMnxJ 15Ve355W+yhj+s6Gu3CoY7uxJJCdZduRZOsZoIP54pnwNCF6kdv4MURcYMzaH0g0GYtT CEJ22sjIcghA6K1XM3R+4eYAckhLvAG8BRVR23DWYE0JrxEhWGCBw5DhHd0cFQSxyqKr XIxaTanPnZk3HJr7oc+1s8rJB+bCpmNeWSkU3ttwdFugF4FePU3En8DVqRQkhCEERLiA kR4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709775247; x=1710380047; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y/NJBCN96he9LhIIVPxGUKB/ZkCQFYv6Jo/gkDDbhf8=; b=p5QFDWGllAIoN6q64at5wXKXL+MvCRLE5sBmv06CAXaHge74VPNzrIpQXqeHMQA3VO j+rnQEwweI+1gw4IfVbiFHmZ8ON4TUf7WQvVaV9Swx9zZ6AFHuqWpz8pwiaGIU0YFhZY OYth8RdEDfni+NjpwFn/xFP85DPgP1pUXX92NCrfyyGwu5hgDQF4yWJHETJ7pY77XhD9 QWmza0yUwcl65dFs7a5kubKXP27Y3nSj/15vKLcWijWj6GQ5lBNRBGVWiB3N4hwDFOG/ lkJfg6wuvOQqIbpWWkf329JAEXalAPv+YkgSe4pQHgtwbsUjdxguewxMxDA+YQXS53Dz 0KpA== X-Forwarded-Encrypted: i=1; AJvYcCVazMQUQ2TY6qJsiN76TKyoVlEnDVsRasi9N2TOyUS6F5j0+F2TPlwyQSUfNElXTVVMRlTlN3WLqG4dKX6krvI= X-Gm-Message-State: AOJu0YzyhrcUuE8TltD/QtwSr/qljKztnWhGGl+iJEy2JHdNFcX/teNY Mh6Z2R3qhH6rkdCNaPXmSraOKItZ5vAghPYcdQ2WSc+BsFRRpw/EnLCQrr6D X-Google-Smtp-Source: AGHT+IE7LuSz/wwjw8om001GZtEC4mJFFcdnRaiL/8AcD0wSQjg5GP07oTyIe1JHt3YI5NUipGn/xg== X-Received: by 2002:adf:f892:0:b0:33e:63c2:c43a with SMTP id u18-20020adff892000000b0033e63c2c43amr34387wrp.26.1709775247087; Wed, 06 Mar 2024 17:34:07 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id bu16-20020a056000079000b0033dc3f3d689sm19049220wrb.93.2024.03.06.17.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:34:06 -0800 (PST) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: Ivan Malov , Huisong Li , dpdk stable Subject: patch 'app/testpmd: verify strdup return' has been queued to stable release 22.11.5 Date: Thu, 7 Mar 2024 01:30:48 +0000 Message-Id: <20240307013159.1735343-31-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240307013159.1735343-1-luca.boccassi@gmail.com> References: <20240307013159.1735343-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 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 Acked-by: Ivan Malov Acked-by: Huisong Li --- 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@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,