Bail if a device symlink target lacks both a colon and a period delimiter.

This commit is contained in:
blitter
2021-07-25 22:17:40 -07:00
parent d333060b17
commit 27b7e3ddb0

View File

@@ -247,6 +247,18 @@ int32_t GetDeviceType(void* device_ctx)
if(!chrptr)
{
chrptr = strrchr(dev_path, '.');
if(!chrptr)
{
free((void*)sysfs_path);
free((void*)dev_path);
free((void*)host_no);
free((void*)iscsi_path);
free((void*)scsi_path);
free((void*)spi_path);
free((void*)fc_path);
free((void*)sas_path);
return dev_type;
}
}
chrptr--;