aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/roff/shift/bad.out_ascii
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
commit3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3 (patch)
tree45cef6947de3a407683fabc94f2ba1f4385da7fc /regress/roff/shift/bad.out_ascii
parentc0ce7eb56abb536b1c8eaedec44f05b67e2bdf6a (diff)
downloadmandoc-3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3.tar.gz
mandoc-3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3.tar.zst
mandoc-3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3.zip
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 'regress/roff/shift/bad.out_ascii')
-rw-r--r--regress/roff/shift/bad.out_ascii6
1 files changed, 4 insertions, 2 deletions
diff --git a/regress/roff/shift/bad.out_ascii b/regress/roff/shift/bad.out_ascii
index 2d6a2922..ddb8c521 100644
--- a/regress/roff/shift/bad.out_ascii
+++ b/regress/roff/shift/bad.out_ascii
@@ -14,8 +14,10 @@ DDEESSCCRRIIPPTTIIOONN
argument used after call: ""
- after shift badarg: "arg2" after excessive shift: 0 ""
+ after shift badarg: "arg2"
+ after shift -1: "arg2"
+ after excessive shift: 0 ""
final text
-OpenBSD August 23, 2018 SHIFT_BAD(1)
+OpenBSD April 24, 2022 SHIFT_BAD(1)