mirror of
https://github.com/aaru-dps/aaruremote.git
synced 2025-12-16 19:24:37 +00:00
Bail if a device symlink target lacks both a colon and a period delimiter.
This commit is contained in:
@@ -247,6 +247,18 @@ int32_t GetDeviceType(void* device_ctx)
|
|||||||
if(!chrptr)
|
if(!chrptr)
|
||||||
{
|
{
|
||||||
chrptr = strrchr(dev_path, '.');
|
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--;
|
chrptr--;
|
||||||
|
|||||||
Reference in New Issue
Block a user