| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
do not allow later files to reset it to zero
|
|
|
|
|
| |
We already do the same for malloc(3) failure.
The is no virtue in trying to survive failure of fork(2) and the like.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cd /usr/src/share/man/man4; vi newdev.4 Makefile; make install; man newdev
When a manual is missing from an outdated database, let man(1)
show it anyway, using a KISS file system lookup as a fallback.
Requested by deraadt@.
87 new lines of code doesn't seem too much bloat to me.
Of course, keeping your mandoc.db(5) files up to date with makewhatis(8)
or weekly(8) is still required for apropos(1) to find your new pages.
|
| |
|
|
|
|
|
| |
conditional request on the same input line, don't skip the first few
bytes of its content.
|
|
|
|
|
| |
failure; found using detailed information provided by Ulrich Spoerlein
<uqs at FreeBSD> about FreeBSD Coverity CID 1261304.
|
|
|
|
|
|
|
|
|
|
| |
manual and its successor groff_mdoc(7), i always considered .Ql as
purely physical markup, but it turns out describing it better allows
to give it a semantic meaning (in-line literal display) that doesn't
contradict existing usage. One less physical, one more semantic
macro, yay!
Found in a discussion with Steffen Nurpmeso <sdaoden at yandex dot com>.
|
|
|
|
|
|
|
| |
It is never dereferenced, but it gets copied around, which worries
static analysis tools and might also confuse human auditors.
FreeBSD Coverity CID 1261298, 1261299, 1261300, reported by
Pedro Giffuni and Ulrich Spörlein <pfg@ and uqs@ at FreeBSD>.
|
|
|
|
|
|
|
| |
an unclosed conditional body. If the memory contained the byte
sequence "\}" after the end of the buffer before the next NUL, this
could even write beyond the end of the buffer, specifically '&' to
the location of the '}'. Found by jsg@ with afl.
|
|
|
|
| |
without the required subsequent argument; found by jsg@ with afl.
|
|
|
|
|
| |
subscripts, superscripts, or "from" or "to" arguments.
Found by jsg@ with afl.
|
|
|
|
|
|
| |
never as a section. Who would have thought that people call their
manual pages 7z(1), 9c(1), 9p(1), and 9p(3)...
Patch from Sebastien Marie <semarie dash openbsd at latrappe dot fr>.
|
|
|
|
| |
defect pointed out by Steffen Nurpmeso <sdaoden at yandex dot com>
|
|
|
|
|
|
| |
between pages. Suggested by Theo Buehler <theo at math dot ethz dot ch>.
Even in UTF-8 output mode, do not use fancy line drawing characters such
that you can easily use /^--- to skip to the next manual in your pager.
|
| |
|
|
|
|
|
|
|
| |
relative to the respective manual tree is longer than PATH_MAX, do not
leak the memory allocated to hold the name. Not sure that can actually
happen, but better safe than sorry.
FreeBSD Coverity Scan CID 1261303, reported by Pedro Giffuni <pfg@>.
|
|
|
|
|
|
| |
* State the defaults for .Os and the fourth .TH argument.
* Sync the section titles, and stop advertising obscure sections that
aren't actually fully supported and certainly not recommended for use.
|
|
|
|
|
|
| |
when .Os has no argument, so do the same for man(7) when .TH has less
than four arguments; there is no reason to treat both differently.
Issue found following a question from Thomas Klausner <wiz at NetBSD>.
|
| |
|
|
|
|
|
|
| |
by limiting the length of expanded input lines during the
(usually recursive) expansion of user defined strings.
Resource hogging found by jsg@ with afl.
|
|
|
|
|
|
| |
Not exactly recommended for use, rather for groff compatibility.
While here, introduce similar SHRT_MAX limits as in man(7),
fixing a few cases of infinite output found by jsg@ with afl.
|
|
|
|
|
|
|
| |
because negative indents can get truncated, in which case we no longer
know how to restore the original indent at the end of the block.
This also solves another case of effectively infinite output found
by jsg@ with afl, triggered by very large negative indents.
|
|
|
|
|
| |
for a table cell with an "nz" layout specification,
causing essentially infinite output as found by jsg@ with afl.
|
|
|
|
|
|
|
|
|
|
|
| |
indentations or paragraph distances, large output may be generated,
which is practically the same as an endless loop; found by jsg@
with afl.
Reject such unreasonably large numbers beyond arbitrary limits
similar to those used by groff (max. 65 blank lines between paragraphs
and max. SHRT_MAX characters per output line) and fall back to
defaults when exceeded. Having the limits behave in exactly the
same way is not relevant.
|
|
|
|
| |
minus twenty lines of code in spite of enhanced functionality
|
| |
|
|
|
|
|
| |
- .sp with an invalid argument is .sp 1v, not .sp 0v
- in man(1), trailing garbage doesn't make scaling units invalid
|
| |
|
|
|
|
|
| |
Basic units, centimeters, points, ens, ems, and the rounding algorithm
were all wrong, only inches, pica, and the default vertical span worked.
|
|
|
|
|
| |
Gets rid of 25 lines of code and one static buffer.
No functional change for numbers shorter than BUFSIZ characters.
|
| |
|
|
|
|
|
|
|
| |
Similarly, avoid having the same block break two other blocks.
In some situations, this could lead to an endless loop in rew_sub()
found by jsg@ with afl.
Minimal example: .Po Ao Pc Bo Pc Ac Bc
|
|
|
|
|
|
| |
and apropos(1) mode. While here, put a space character between
options and option arguments in error messages.
Both reported by Alessandro DE LAURENZIS <just22 dot adl at gmail dot com>.
|
|
|
|
| |
patch from daniel@
|
|
|
|
|
|
|
|
| |
1) rew_sub(): Make sure REWIND_MORE is acted upon even when followed by
REWIND_NONE. This prevents .It from ending up inside other children of .Bl.
2) blk_exp_close(): Only allow extension of .Bl when it has at least
one .It. Otherwise, a broken child block could be moved in front of
the .Bl, effectively resulting in a .Bl that ended before it began.
|
| |
|
|
|
|
|
|
| |
by calling assert() when valid user input exceeds it is a bad idea.
Allocate the terminal font stack dynamically instead of crashing
above 10 entries. Issue found by jsg@ with afl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It accepted invalid byte sequences like 0xc080-c1bf, 0xe08080-e09fbf,
0xeda080-edbfbf, and 0xf0808080-f08fbfbf, produced valid roff Unicode
escape sequences from them, and the algorithm contained strong
defenses against any attempt to fix it.
This cures an assertion failure in the terminal formatter caused
by sneaking in ASCII 0x08 (backspace) by "encoding" it as an (invalid)
multibyte UTF-8 sequence, found by jsg@ with afl.
As a bonus, the new algorithm also reduces the code in the function
by about 20%.
|
|
|
|
| |
from jmc@
|
|
|
|
| |
Fixes an assertion found by jsg@ with afl.
|
|
|
|
|
| |
the first .It. Otherwise, move it out together with whatever
follows. Fixing an assertion failure found by jsg@ with afl.
|
|
|
|
|
|
|
|
| |
macro (for example .Xo) and never closed again, the item ends up
without a body block. This can even happen for list types that
usually don't have heads in the first place. So even in this
case, check for the existence of the body before accessing it.
NULL pointer access found by jsg@ with afl.
|
|
|
|
| |
Found by jsg@ with afl.
|
|
|
|
|
|
|
| |
already closed. In this respect, also consider lists closed
that have broken another block, their closure pending until the
end of the broken block. This avoids syntax tree corruption
leading to a NULL pointer access found by jsg@ with afl.
|
| |
|
| |
|
|
|
|
|
|
| |
as the first man(1) command line argument without -s:
Accept digits like "1", "2"; digit+letter like "3p", "1X"; and "n".
Issue reported by Svyatoslav Mishyn <juef at openmailbox dot org> (Crux Linux).
|
|
|
|
|
| |
would abort the table in an unclean way, causing assertion failures
found by jsg@.
|
|
|
|
|
| |
and change the name of \(-~ to \(|= to agree with groff;
difference found by Carsten dot Kunze at arcor dot de
|
|
|
|
|
| |
just like explicit block macros themselves.
Fixing an assertion failure jsg@ found with afl.
|