mirror of
https://github.com/neovim/neovim.git
synced 2026-03-02 06:12:24 +10:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user