From: Stephen Hemminger <stephen@networkplumber.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netdev@vger.kernel.org
Subject: Re: [iproute PATCH v2 5/5] tipc/bearer: Prevent NULL pointer dereference
Date: Fri, 18 Aug 2017 09:24:22 -0700 [thread overview]
Message-ID: <20170818092422.3c178db7@xeon-e3> (raw)
In-Reply-To: <20170817170931.24545-6-phil@nwl.cc>
On Thu, 17 Aug 2017 19:09:31 +0200
Phil Sutter <phil@nwl.cc> wrote:
> - opt = get_opt(opts, "media");
> - if (strcmp(opt->val, "udp") == 0) {
> + if ((opt = get_opt(opts, "media")) &&
> + strcmp(opt->val, "udp") == 0) {
Please don't merge assignment and comparison unless necessary for other reasons.
opt = get_opt(opts, "media");
if (opt && strcmp(opt->val, "udp") == 0) {
prev parent reply other threads:[~2017-08-18 16:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 17:09 [iproute PATCH v2 0/5] Covscan: Fix potential NULL pointer dereferences Phil Sutter
2017-08-17 17:09 ` [iproute PATCH v2 1/5] ifstat, nstat: Check fdopen() return value Phil Sutter
2017-08-17 17:09 ` [iproute PATCH v2 2/5] nstat: Fix for potential NULL pointer dereference Phil Sutter
2017-08-18 16:28 ` Stephen Hemminger
2017-08-17 17:09 ` [iproute PATCH v2 3/5] tc/q_netem: Don't dereference possibly NULL pointer Phil Sutter
2017-08-18 16:25 ` Stephen Hemminger
2017-08-17 17:09 ` [iproute PATCH v2 4/5] tc/tc_filter: Make sure filter name is not empty Phil Sutter
2017-08-18 9:30 ` David Laight
2017-08-18 11:16 ` Phil Sutter
2017-08-18 16:34 ` David Laight
2017-08-18 16:57 ` Phil Sutter
2017-08-17 17:09 ` [iproute PATCH v2 5/5] tipc/bearer: Prevent NULL pointer dereference Phil Sutter
2017-08-18 16:24 ` Stephen Hemminger [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=20170818092422.3c178db7@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.