The regression fix in rev. 1.271 was still incomplete.
While the fchdir(2) in main() is indeed needed such that the mparse_open()
in process_onefile() finds local files, there is a second, smaller
issue purely inside check_xr(): As the ultimate fallback, fs_search()
looks for cross-referenced manual pages in the current directory,
which is typically used for working on software under development
that is not yet installed. Consequently, a second fchdir(2) is needed
inside check_xr() between mansearch(), which typically changes directory,
and the subsequent fs_search().
This makes sure that "mandoc -T lint" on a manual page that contains
an .Xr link to another manual page that is not installed but present
in the current directory does not complain about that link.
Again reported by anton@.
The fix is slightly awkward because the directory file descriptor
needs to be passed down through multiple layer of subroutines, but i
fear that cannot be helped because it is needed both in the main program
and in the low-level function check_xr().
Add kernel support for the vector extension on riscv64.
The V extension (where supported) adds an additional 32 vector registers
that are variable length (up to 65,536 bits, but more commonly 2048 bits).
In order to support the use of the V extension (and additional vector
extensions) we need to enable the vector extension and save/restore the
vector registers.
ok kettenis@
openssl s_client: avoid two out of bounds writes
A NUL termination after an unchecked BIO_read() call in XMSS mode could
lead to a write one byte before the start of sbuf or one past its end.
Add an error check to avoid the former and read one byte less to avoid the
latter.
Found by Frank Denis
libssl: record extension lengths in ClientHello hashing
The ClientHello hash is intended to ensure that the second CH after an HRR
only makes the allowed changes to the TLS extensiosn by recording message
type followed by the raw extension data if it must remain unchanged.
This makes it possible (in principle) that part of free form extension
data is confused with type (and length) information of a subsequent
extension.
Recording the length after the type prevents such a confusion and fixes
the framing of the extensions.
Found by Frank Denis
ok jsing
PKCS#12: fix erroneous error check in PKCS12_newpass()
This is an error I introduced in a refactoring two years ago in r1.20.
This means that nothing uses this...
From Frank Denis via logan
Use uint32_t instead of SHA_LONG in the SHA-256 code.
This is more readable and we already have a compile time assert that they
are the same size.
ok tb@