tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Michael Stapelberg <stapelberg@debian.org>
Cc: tech@mdocml.bsd.lv
Subject: Re: mandoc 1.14.3 segfault
Date: Wed, 6 Sep 2017 18:30:52 +0200	[thread overview]
Message-ID: <20170906163052.GL4224@athene.usta.de> (raw)
In-Reply-To: <CANnVG6=xf7twZwW8L1tf3B-fc0fbs+FXECRh29PtFKo0h6_wfQ@mail.gmail.com>

Hi Michael,

Michael Stapelberg wrote on Sat, Aug 12, 2017 at 12:27:32PM +0200:

> I'm running into a segfault with mandoc 1.14.3.

Sorry for the delay, i got distracted by xlocale support in our libc.

I just committed the patch below.

Given that

  .SS ""

is quite exotic (and nonsensical), i consider the issue minor
and not requiring an emergency release.

Thanks for both the report and the reminder!

Yours,
  Ingo


Log Message:
-----------
fix a NULL pointer access on deroff() failure;
could be triggered with '.SS ""';
reported by Michael <Stapelberg at debian>

Modified Files:
--------------
    mandoc:
        html.c

Revision Data
-------------
Index: html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/html.c,v
retrieving revision 1.219
retrieving revision 1.220
diff -Lhtml.c -Lhtml.c -u -p -r1.219 -r1.220
--- html.c
+++ html.c
@@ -250,6 +250,8 @@ html_make_id(const struct roff_node *n)
 
 	buf = NULL;
 	deroff(&buf, n);
+	if (buf == NULL)
+		return NULL;
 
 	/* http://www.w3.org/TR/html5/dom.html#the-id-attribute */
 
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

      parent reply	other threads:[~2017-09-06 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-12 10:27 Michael Stapelberg
2017-08-12 10:57 ` Jan Stary
2017-08-29  7:04   ` Michael Stapelberg
2017-09-06 16:30 ` Ingo Schwarze [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=20170906163052.GL4224@athene.usta.de \
    --to=schwarze@usta.de \
    --cc=stapelberg@debian.org \
    --cc=tech@mandoc.bsd.lv \
    --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).