Age | Commit message (Collapse) | Author |
|
|
|
|
|
pointers in the pages table, do not access NULL pointers, but
gracefully handle the errors.
Similar patches will be needed for the macro tables, too.
<attila at stalphonsos dot com> audited the code and pointed out to me
that dbm_get() can return NULL for corrupted databases, but that isn't
handled properly at various places.
|
|
|
|
and there was no preceding .It macro, do not read the byte
before the beginning of the line buffer.
Found by tb@ with afl@.
|
|
but reading the database fails, report the full path to the database
on standard error, and mention that the database is automatically
recreated from scratch.
Suggested by espie@.
|
|
format based on SQLite 3, say so in words that mortals can
understand rather than babbling about hex magic.
Suggested by espie@.
|
|
are open, all except the innermost open block got a bogus MDOC_ENDED
marker, in some situations triggering segfaults down the road
which tb@ found with afl(1).
Fix the logic error by figuring out up front whether an end macro
has a matching body, and if it hasn't, don't mark any blocks as broken.
|
|
ignore body end markers of lists breaking other blocks.
Fixing a logical error that caused a NULL deref found by tb@ with afl(1).
|
|
and roff-level nodes (e.g. tbl or eqn) follow, don't run into an
assertion. Instead, wrap the roff-level nodes in their own row.
Issue found by tb@ with afl(1).
|
|
ok schwarze@
|
|
empty string got added to the list of sections, breaking the database
format slightly and causing the page to not be considered part of
any section, not even if a section could be deduced from the directory
or from the file name.
Bug found due to the bogus pcredemo(3) "manual" in the pcre-8.38p0 package.
|
|
changes, do not prepend a stray NAME_FILE (0x10) byte to the first
names of pages.
Bug found while investigating another issue reported by sthen@.
|
|
as architecture-independent even if they abuse the third (architecture)
argument of the .Dt macro for random stuff like "freetds reference manual".
While the .Dt syntax is not the same as the .TH syntax in man(7),
punishing offenders by treating them as architecture-dependent and
hence completely excluding them from searches is too severe.
Problem reported by sthen@.
|
|
continue scanning upwards, because the enclosing block might already
be pending as well, e.g. .Bl .Bl .It Bo .El .It.
Tree corruption leading to a later NULL deref found by tb@ with afl(1).
|
|
|
|
it has no type, but is on the other hand breaking another block,
delete its end marker as well, or the end marker may remain behind
as an orphan, triggering an assertion in the terminal formatter.
Problem found by tb@ with afl(1).
|
|
in-line macro, and don't printf("%s", NULL) if the first child
of the first .Sh is a macro; again found by tb@ with afl(1).
(No, you should never use macros in any .Sh at all, please.)
|
|
|
|
in a list of a type where items don't takes arguments.
Issue found by tb@ with afl(1).
|
|
don't let a subsequent -width access mdoc_argnames[] out of bounds.
Found by tb@ with afl(1).
|
|
sequences that jsg@ found with afl(1):
* Avoid writing \t\b in term.c.
* Handle trailing \b in term_ps.c.
|
|
found while investigating an unrelated bug report from jsg@
|
|
|
|
names from .Sh NAME; no dire consequences on OpenBSD since we no
longer have MLINKS for mdoc(7) pages
|
|
with makewhatis -d to a completely empty database.
Reported by Mark Patruck <mark at wrapped dot cx>, thanks!
|
|
Committing this quickly because it hurts package builders.
Regression reported by naddy@.
|
|
Drop the obsolete names_check() now that we deleted MLINKS.
Run "doas makewhatis" after compiling and installing this.
Earlier version tested by jmc@ and jturner@;
"commit it all" deraadt@ "commit and dodge" krw@
|
|
characters in their source code, so switch on charset autodetection
in the same way as in man(1) itself.
Issue reported by Pavan Maddamsetti at gmail dot com on bugs@.
|
|
|
|
in mparse_alloc(), so delete all the curp->man == NULL checks.
Triggered by a patch from Christos Zoulas suggesting to add
yet another such check.
|
|
Triggered by a smaller patch from Christos Zoulas.
|
|
because we know it is actually mutable or because we are passing
it to a function that doesn't accept a const object but won't
actually attempt to modify it - simply casting from (const type *)
to (type *) is legal C and clearly expresses the intent.
So get rid of the obfuscating UNCONST macro.
Basic idea discussed with guenther@.
|
|
hid among static functions, as noticed by tedu@ (my bad).
|
|
noticed by Christos Zoulas with -Wmissing-prototypes
|
|
independent of each other, as in:
http://man.openbsd.org[/manpath][/mansec][/arch]/name[.sec]
The restrictions in the past kept confusing people.
Triggered by a question from RafaelNeves at gmail dot com.
|
|
from working in the absence of a mandoc.db(5) database.
Found the hard way by Svyatoslav Mishyn on Crux Linux.
|
|
"mandoc" that was used for man.cgi(8) documentation and by assuming
that the apropos(1) and man.cgi(8) manuals are simply installed in
the default manpath. Even though man.cgi(8) is not installed by
default when installing OpenBSD, it is easy to copy it into the
default manpath used for man.cgi(8).
Idea found when considering a question asked by wrant dot com.
|
|
a manpath. For example, this makes http://man.openbsd.org/mandoc
work as expected.
Bug reported by tb@, reminded by Svyatoslav Mishyn.
|
|
from Joerg Sonnenberger via Thomas Klausner, NetBSD.
|
|
the same stream, and actually, it fails spectacularly on glibc.
Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox
dot org> after testing on Void Linux.
|
|
gets a SIGTTOU signal. In that case, do not stop.
Portability issue found while testing on commercial Solaris 9/10/11.
Thanks to opencsw.org for providing me with a testing environment.
|
|
|
|
which was forgotten when implementing the new man.conf(5) format.
The outdated information was originally pointed out
by Andy Bradford <amb dash openbsd at bradfords dot org> on misc@.
OK jmc@
|
|
one table, minus twenty lines of code, no loss of functionality.
No idea why i didn't do this earlier...
|
|
|
|
that is, for the index page, for the noresult page, and for the
result of an apropos(1) query with more than one page.
As noted by bentley@, when a manual page is displayed, it is more
important that people can quickly use the space bar for paging and
Ctrl-F for searching.
|
|
Patch from Fabian dot Raetz at gmail dot com.
|
|
as parsers, page generators, and result generators more obvious.
No functional change.
|
|
|