HomeFreeBSD

MFC 365276: Compute the correct size of the string to move forward.

Description

MFC 365276: Compute the correct size of the string to move forward.

Previously this was counting the amount of spare room at the start of
the buffer that the string needed to move forward and passing that as
the number of bytes to copy to memmove rather than the length of the
string to be copied.

In the strfmon test in the test suite this caused the memmove to
overflow the allocated buffer by one byte which CHERI caught.

Details

Provenance
jhbAuthored on
Parents
rS365818: Add support to the rpc.tlsservd daemon for shutting down connections that
Branches
Unknown
Tags
Unknown