HomeFreeBSD

MFC r301679 (partial), r309626, r326307

Description

MFC r301679 (partial), r309626, r326307

r301679:
Update to a June 8th snapshot of (un)vis form NetBSD.

This adds stravis() and some new encoding flags VIS_SHELL, VIS_META,
and VIS_NOLOCALE.

Assorted cleanups and fixes includeing a manpage typo[0].

NOTE: The symbol for stravis() is not exported in this merge.

r309626:
strvis(3): Avoid internal state of multibyte functions being tainted.

The mbtoc(3) and wctomb(3) functions use internal state which may be
tainted before the call to strvis(3). In this context we can just use
the thread-safe versions mbrtoc(3) and wcrtomb(3) which allow passing
our own state from our stack.

r326307:
Update vis(3) the latest from NetBSD.

This adds VIS_DQ for compatiblity with OpenBSD.

Correct by an off-by-one error and a read buffer overflow detected using
asan.

PR: 210013 [0]
Submitted by: pi [0]

Details

Provenance
brooksAuthored on
Parents
rS326323: MFC r325363:
Branches
Unknown
Tags
Unknown