create_tempfile: pass pointer to full pathname to strlcat()
authormillert <millert@openbsd.org>
Thu, 17 Oct 2024 15:38:38 +0000 (15:38 +0000)
committermillert <millert@openbsd.org>
Thu, 17 Oct 2024 15:38:38 +0000 (15:38 +0000)
commitbdfaa295cdd5cc454d9e6fddd6b4e066025c806c
tree3584f58f1168a7af6ac55b5a79535cd29c68729f
parent6c0a1cff93ccff8c8374ece54d321913322a6704
create_tempfile: pass pointer to full pathname to strlcat()

Fixes a potential buffer overrun.  Also check strlcpy() and strlcat()
return value to detect truncations.  Based on a diff from naddy@.
OK naddy@ tb@ deraadt@
usr.bin/xinstall/xinstall.c