ssh: xstrdup(): use memcpy(3)
authorcheloha <cheloha@openbsd.org>
Sun, 13 Mar 2022 23:27:54 +0000 (23:27 +0000)
committercheloha <cheloha@openbsd.org>
Sun, 13 Mar 2022 23:27:54 +0000 (23:27 +0000)
commit240c337aaf51810caa9d153b70c36a1e0fc340ea
treef910a23a96cb79d9b8fbbda33f13f21ee4a39bba
parenta52a184822728f5673467e9c38e9a82f918036cc
ssh: xstrdup(): use memcpy(3)

Copying the given string into the buffer with strlcpy(3) confers no
benefit in this context because we have already determined the
string's length with strlen(3) in order to allocate that buffer.

Thread: https://marc.info/?l=openbsd-tech&m=164687525802691&w=2

ok dtucker@ millert@
usr.bin/ssh/xmalloc.c