vim-patch:8.2.2456: Coverity warning for strcpy() into fixed size array

Problem:    Coverity warning for strcpy() into fixed size array.
Solution:   Add a type cast to hopefully silence the bogus warning.

7b6903f02c

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-10-10 09:41:31 -04:00
parent eb67f3a6ba
commit 7995e7a89b

View File

@@ -281,7 +281,7 @@ static ufunc_T *alloc_ufunc(const char *name, size_t namelen)
{
size_t len = offsetof(ufunc_T, uf_name) + namelen + 1;
ufunc_T *fp = xcalloc(1, len);
STRCPY(fp->uf_name, name);
xmemcpyz(fp->uf_name, name, namelen);
fp->uf_namelen = namelen;
if ((uint8_t)name[0] == K_SPECIAL) {