mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
virDevMapperGetTargetsImpl: Use virStrcpy instead of virStrncpy
virStrncpy was called with -1 for length of the copied source which is equivalent to virStrcpy. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
33122ed16f
commit
e8f5711274
@ -240,7 +240,7 @@ virDevMapperGetTargetsImpl(int controlFD,
|
||||
if (!(sanitizedPath = virDMSanitizepath(path)))
|
||||
return 0;
|
||||
|
||||
if (virStrncpy(dm.name, sanitizedPath, -1, DM_TABLE_DEPS) < 0) {
|
||||
if (virStrcpy(dm.name, sanitizedPath, DM_TABLE_DEPS) < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("Resolved device mapper name too long"));
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user