]> git.cameronkatri.com Git - mandoc.git/commit
If a .shift request has a negative argument, do not use a negative array
authorIngo Schwarze <schwarze@openbsd.org>
Sun, 24 Apr 2022 13:38:46 +0000 (13:38 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Sun, 24 Apr 2022 13:38:46 +0000 (13:38 +0000)
commit3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3
tree45cef6947de3a407683fabc94f2ba1f4385da7fc
parentc0ce7eb56abb536b1c8eaedec44f05b67e2bdf6a
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).
mandoc.1
mandoc.h
mandoc_msg.c
regress/roff/shift/bad.in
regress/roff/shift/bad.out_ascii
regress/roff/shift/bad.out_lint
roff.c