[coverity] 1543213 Dereference before null check

This commit is contained in:
akallabeth 2024-04-12 10:37:59 +02:00 committed by akallabeth
parent be4fb7f6dd
commit a8ce0aee29

View File

@ -1154,10 +1154,13 @@ static UINT rdpdr_process_connect(rdpdrPlugin* rdpdr)
{
const char DynamicDrives[] = "DynamicDrives";
const RDPDR_DRIVE* drive = (const RDPDR_DRIVE*)device;
if (!drive->Path)
continue;
BOOL hotplugAll = strncmp(drive->Path, "*", 2) == 0;
BOOL hotplugLater = strncmp(drive->Path, DynamicDrives, sizeof(DynamicDrives)) == 0;
if (drive->Path && (hotplugAll || hotplugLater))
if (hotplugAll || hotplugLater)
{
if (!rdpdr->async)
{