Windows: Add checks on IOCTL_DISK_GET_DRIVE_LAYOUT_EX response to make Coverity happy.
This commit is contained in:
parent
1662abb707
commit
70d083bfb2
|
@ -11995,9 +11995,12 @@ void UpdateMountableHostDeviceList ()
|
|||
(LPVOID) buffer.data(),
|
||||
(DWORD) buffer.size(),
|
||||
(LPDWORD) &bytesReturned,
|
||||
NULL))
|
||||
NULL) && (bytesReturned >= sizeof (DRIVE_LAYOUT_INFORMATION_EX)))
|
||||
{
|
||||
PDRIVE_LAYOUT_INFORMATION_EX layout = (PDRIVE_LAYOUT_INFORMATION_EX) buffer.data();
|
||||
// sanity checks
|
||||
if (layout->PartitionCount <= 256)
|
||||
{
|
||||
for (DWORD i = 0; i < layout->PartitionCount; i++)
|
||||
{
|
||||
if (layout->PartitionEntry[i].PartitionStyle == PARTITION_STYLE_MBR)
|
||||
|
@ -12054,6 +12057,7 @@ void UpdateMountableHostDeviceList ()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bIsDynamic)
|
||||
dynamicVolumesPresent = true;
|
||||
|
|
Loading…
Reference in New Issue