From: "Ulrich Spörlein" <uqs@spoerlein.net>
To: Ingo Schwarze <schwarze@usta.de>
Cc: tech@mdocml.bsd.lv
Subject: Re: [patch] avoid possible null pointer dereference
Date: Sat, 18 May 2013 21:26:53 +0200 [thread overview]
Message-ID: <20130518192653.GH2055@acme.spoerlein.net> (raw)
In-Reply-To: <20130518175435.GB13985@iris.usta.de>
On Sat, 2013-05-18 at 19:54:35 +0200, Ingo Schwarze wrote:
> Hi Ulrich,
>
> Ulrich Spörlein wrote on Fri, May 17, 2013 at 03:37:39AM +0200:
>
> > termp_xx_pre() will call term_word() with NULL when the switch case
> > falls through to the default case.
>
> Actually, that cannot happen because termp_xx_pre() will not be called
> for macros it is not intended to handle.
>
> Still, it's arguably a cosmetical issue. The code looks like the default
> case would be legitimate, which it is not.
>
> > There are several ways to avoid the segfault, not sure this is the
> > best one.
>
> No, it isn't, because that merely substitutes one uncontrolled failure
> mode by another one that's arguably even harder to debug, should it
> ever occur (after incorrect code changes elsewhere).
>
> Instead, i committed a change to bsd.lv and openbsd.org using abort(3).
Thanks! I figured that it was not the best fix, but I don't know the API
"contracts" within mdocml.
There are a couple more issues that Coverity Scan thinks exists, but I
need to understand those better first.
Cheers,
Uli
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
prev parent reply other threads:[~2013-05-18 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-17 1:37 Ulrich Spörlein
2013-05-18 17:54 ` Ingo Schwarze
2013-05-18 19:26 ` Ulrich Spörlein [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=20130518192653.GH2055@acme.spoerlein.net \
--to=uqs@spoerlein.net \
--cc=schwarze@usta.de \
--cc=tech@mdocml.bsd.lv \
/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).