From: Martin Wilck <mwilck@suse.de>
To: dm-devel@redhat.com
Subject: Re: [PATCH 4/9] multipathd: don't call strlen on NULL variables
Date: Thu, 13 Apr 2017 16:12:43 +0200 [thread overview]
Message-ID: <1492092763.22602.0.camel@suse.de> (raw)
In-Reply-To: <1491545798-22183-5-git-send-email-bmarzins@redhat.com>
On Fri, 2017-04-07 at 01:16 -0500, Benjamin Marzinski wrote:
> strlen has undefined results when passed a NULL variable, so don't do
> it.
>
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
This is certainly correct. Yet I have two remarks:
1) There are many more calls to strlen() in the multipath-tools code
which would need to be likewise protected.
2) If STRDUP("ok\n") returns NULL, we're likely to be so hosed that we
might as well call abort() anyway (which is a philosophy that I
personally quite like - multipathd is not such a vital part of the
system that it can't risk dying).
Regards
Martin
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2017-04-13 14:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 6:16 [PATCH 0/9] misc cleanups and bugfixes Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 1/9] libdmmp: minor Makefile cleanup Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 2/9] multipath-tools: remove incdir from Makefiles Benjamin Marzinski
2017-04-13 13:29 ` Martin Wilck
2017-04-07 6:16 ` [PATCH 3/9] libdmmp: don't disconnect from multipathd twice Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 4/9] multipathd: don't call strlen on NULL variables Benjamin Marzinski
2017-04-13 14:12 ` Martin Wilck [this message]
2017-04-07 6:16 ` [PATCH 5/9] libdmmp: move libdmmp.pc install location Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 6/9] multipathd: drop lock before calling uev_add_path Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 7/9] multipathd: allow devices to switch from RW to RO Benjamin Marzinski
2017-04-13 14:39 ` Martin Wilck
2017-04-13 17:53 ` Benjamin Marzinski
2017-04-13 14:40 ` Martin Wilck
2017-04-07 6:16 ` [PATCH 8/9] libmultipath: don't set max_sectors_kb on reloads Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 9/9] multipath: fix segfault with disable_changed_wwids Benjamin Marzinski
2017-04-07 7:28 ` Shichangkuo
2017-04-12 7:36 ` [PATCH 0/9] misc cleanups and bugfixes Christophe Varoqui
2017-04-13 14:56 ` Martin Wilck
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=1492092763.22602.0.camel@suse.de \
--to=mwilck@suse.de \
--cc=dm-devel@redhat.com \
/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