From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Avoid a read access one byte beyond the end of an allocated
Date: Wed, 1 Aug 2018 08:46:45 -0500 (EST) [thread overview]
Message-ID: <c89ec59a4d4eb6e5@fantadrom.bsd.lv> (raw)
Log Message:
-----------
Avoid a read access one byte beyond the end of an allocated string
which occurred in situations like ".Fl a Cm --"; found by
Leah Neukirchen <leah at vuxu dot org> with valgrind on Void Linux.
Modified Files:
--------------
mandoc:
mdoc_validate.c
NEWS
Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v
retrieving revision 1.358
retrieving revision 1.359
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.358 -r1.359
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -440,7 +440,7 @@ check_text_em(struct roff_man *mdoc, int
np->string != '\0' &&
isalpha((unsigned char)np->string[
strlen(np->string) - 1])) ||
- (cp[2] != '\0' ?
+ (cp[1] != '\0' && cp[2] != '\0' ?
isalpha((unsigned char)cp[2]) :
nn != NULL &&
nn->type == ROFFT_TEXT &&
Index: NEWS
===================================================================
RCS file: /home/cvs/mandoc/mandoc/NEWS,v
retrieving revision 1.29
retrieving revision 1.30
diff -LNEWS -LNEWS -u -p -r1.29 -r1.30
--- NEWS
+++ NEWS
@@ -59,8 +59,8 @@ Changes in version 1.14.4, released on A
on diagnostic messages and on the documentation.
* Thomas Klausner (NetBSD) for suggesting two new style messages,
one new feature, and for two bug reports.
- * Leah Neukirchen (Void Linux) for suggesting a new style message
- and for two bug reports.
+ * Leah Neukirchen (Void Linux) for suggesting a new style message,
+ four bug reports, and release testing.
* Anthony Bentley (OpenBSD) for reporting multiple bugs and missing
features.
* Paul Irofti (OpenBSD) and Nate Bargmann for suggesting new features.
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
reply other threads:[~2018-08-01 13:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c89ec59a4d4eb6e5@fantadrom.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.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).