DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Olivier Matz <olivier.matz@6wind.com>
Cc: dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] kvargs: fix crash when parsing an invalid token on FreeBSD
Date: Wed, 6 May 2020 15:22:40 +0200	[thread overview]
Message-ID: <CAJFAV8yqnrVGu2B5qZLOoofPZs1FSjxsA+MFCP2UssD9JwAHHg@mail.gmail.com> (raw)
In-Reply-To: <20200429131700.25294-1-olivier.matz@6wind.com>

On Wed, Apr 29, 2020 at 3:17 PM Olivier Matz <olivier.matz@6wind.com> wrote:
>
> The behavior of strtok_r() is not the same between GNU libc and FreeBSD
> libc: in the first case, the context is set to "" when the last token is
> returned, while in the second case it is set to NULL.
>
> On FreeBSD, the current code crashes because we are dereferencing a NULL
> pointer (ctx1). Fix it by first checking if it is NULL. This works with
> both GNU and FreeBSD libc.
>
> Fixes: ffcf831454a9 ("kvargs: fix buffer overflow when parsing list")
> Cc: stable@dpdk.org
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Tested-by: Zhimin Huang <zhiminx.huang@intel.com>

Applied, thanks.

-- 
David Marchand


      parent reply	other threads:[~2020-05-06 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 13:17 [dpdk-dev] " Olivier Matz
2020-04-30  9:41 ` Huang, ZhiminX
2020-05-06 13:22 ` David Marchand [this message]

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=CAJFAV8yqnrVGu2B5qZLOoofPZs1FSjxsA+MFCP2UssD9JwAHHg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    /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).