DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bing Zhao <bingz@nvidia.com>
To: Thierry Herbelot <thierry.herbelot@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	"stable@dpdk.org" <stable@dpdk.org>, Ori Kam <orika@nvidia.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: do not use a possibly NULL Pointer
Date: Tue, 25 May 2021 14:01:30 +0000	[thread overview]
Message-ID: <CH0PR12MB5041FEEE2AB909F3392B0EEBD0259@CH0PR12MB5041.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210524090144.16908-1-thierry.herbelot@6wind.com>

Hi Thierry,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Thierry Herbelot
> Sent: Monday, May 24, 2021 5:02 PM
> To: dev@dpdk.org
> Cc: Thierry Herbelot <thierry.herbelot@6wind.com>; NBU-Contact-
> Thomas Monjalon <thomas@monjalon.net>; stable@dpdk.org; Ori Kam
> <orika@nvidia.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: do not use a possibly NULL
> Pointer
> 
> External email: Use caution opening links or attachments
> 
> 
> Use out only after it was checked not to be NULL.
> 
> Fixes: 4d07cbefe3ba0 ("app/testpmd: add commands for conntrack")
> Cc: stable@dpdk.org
> Cc: Ori Kam <orika@nvidia.com>
> 
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> ---
>  app/test-pmd/cmdline_flow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-
> pmd/cmdline_flow.c
> index 1c587bb7b803..7645b3cc90a1 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -6631,10 +6631,10 @@ parse_vc_action_conntrack_update(struct
> context *ctx, const struct token *token,
>         /* Token name must match. */
>         if (parse_default(ctx, token, str, len, NULL, 0) < 0)
>                 return -1;
> -       ct_modify = (struct rte_flow_modify_conntrack *)out-
> >args.vc.data;
>         /* Nothing else to do if there is no buffer. */
>         if (!out)
>                 return len;
> +       ct_modify = (struct rte_flow_modify_conntrack *)out-
> >args.vc.data;

Thanks.
Will there be a segment fault if an auto-completion is done by using "tab"?

>         if (ctx->curr == ACTION_CONNTRACK_UPDATE_DIR) {
>                 ct_modify->new_ct.is_original_dir =
>                                 conntrack_context.is_original_dir;
> --
> 2.29.2

Reviewed-by: Bing Zhao <bingz@nvidia.com>

  reply	other threads:[~2021-05-25 14:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  9:01 Thierry Herbelot
2021-05-25 14:01 ` Bing Zhao [this message]
2021-06-10 17:28 ` Singh, Aman Deep
2021-06-29  8:26   ` Andrew Rybchenko

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=CH0PR12MB5041FEEE2AB909F3392B0EEBD0259@CH0PR12MB5041.namprd12.prod.outlook.com \
    --to=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=thierry.herbelot@6wind.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).