summaryrefslogtreecommitdiffstats
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-04-24 13:38:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-04-24 13:38:46 +0000
commit43f9fbf1c67bd7237ef7670c2fd3019a4bbc84f0 (patch)
tree38a625b9c89a8ddb151eed876697ef560453022a /mandoc.1
parent90d64fa2f97635da52e38a1dfeba56f657a11bbd (diff)
downloadmandoc-43f9fbf1c67bd7237ef7670c2fd3019a4bbc84f0.tar.gz
If a .shift request has a negative argument, do not use a negative array
index but use 0 instead of the argument, just like groff. Warn about the invalid argument. While here, fix the column number in another warning message. Segfault reported by tb@, found with afl(1).
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.19
1 files changed, 8 insertions, 1 deletions
diff --git a/mandoc.1 b/mandoc.1
index 9aebdae1..6e0c7c67 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,6 +1,6 @@
.\" $Id$
.\"
-.\" Copyright (c) 2012, 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2012, 2014-2022 Ingo Schwarze <schwarze@openbsd.org>
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -2082,6 +2082,13 @@ and expands to the empty string.
.Pq roff
The argument of the escape sequence \e$ is not a digit;
the escape sequence expands to the empty string.
+.It Sy "negative argument, using 0"
+.Pq roff
+A
+.Ic \&shift
+request has a negative argument
+or an argument that is negative due to integer overflow.
+Macro argument numbering remains unchanged.
.It Sy "NOT IMPLEMENTED: Bd -file"
.Pq mdoc
For security reasons, the