Avoid coverity warning by using memmove rather than strcpy

This commit is contained in:
Richard Frith-Macdonald 2020-08-23 19:01:42 +01:00
parent b47faf74bc
commit e94025271b

View file

@ -1557,7 +1557,7 @@ load_iface(const char* from)
}
if (ptr != buf)
{
strcpy(buf, ptr);
memmove(buf, ptr, strlen(ptr) + 1);
}
/*
* Strip comments.
@ -1629,7 +1629,7 @@ load_iface(const char* from)
}
if (ptr != buf)
{
strcpy(buf, ptr);
memmove(buf, ptr, strlen(ptr) + 1);
}
/*
* Strip comments.
@ -4968,7 +4968,7 @@ printf(
}
if (ptr != buf)
{
strcpy(buf, ptr);
memmove(buf, ptr, strlen(ptr) + 1);
}
/*
* Strip comments.