diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2022-04-24 13:38:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2022-04-24 13:38:46 +0000 |
commit | 43f9fbf1c67bd7237ef7670c2fd3019a4bbc84f0 (patch) | |
tree | 38a625b9c89a8ddb151eed876697ef560453022a /mandoc.1 | |
parent | 90d64fa2f97635da52e38a1dfeba56f657a11bbd (diff) | |
download | mandoc-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.1 | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 |