From 827a4c3faa27e0c186452585b15094eee1119085 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:25:12 +0200 Subject: Merging upstream version 3.5.0+dfsg1. Signed-off-by: Daniel Baumann --- channels/rdpdr/client/rdpdr_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'channels/rdpdr/client/rdpdr_main.c') diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 53f5011..2ffa951 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -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) { @@ -1274,7 +1277,6 @@ static UINT rdpdr_send_client_name_request(rdpdrPlugin* rdpdr) WINPR_ASSERT(rdpdr->computerName); computerNameW = ConvertUtf8ToWCharAlloc(rdpdr->computerName, &computerNameLenW); computerNameLenW *= sizeof(WCHAR); - WINPR_ASSERT(computerNameLenW >= 0); if (computerNameLenW > 0) computerNameLenW += sizeof(WCHAR); // also write '\0' -- cgit v1.2.3