diff --git a/src/device/device_util.c b/src/device/device_util.c index 9e71287342..7b72a94811 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -152,14 +152,14 @@ const char *dev_path(const struct device *dev) buffer[0] = '\0'; if (!dev) { - memcpy(buffer, "", 7); + strcpy(buffer, ""); } else { switch (dev->path.type) { case DEVICE_PATH_NONE: - memcpy(buffer, "NONE", 5); + strcpy(buffer, "NONE"); break; case DEVICE_PATH_ROOT: - memcpy(buffer, "Root Device", 12); + strcpy(buffer, "Root Device"); break; case DEVICE_PATH_PCI: snprintf(buffer, sizeof(buffer),