diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:12 +0000 |
commit | 827a4c3faa27e0c186452585b15094eee1119085 (patch) | |
tree | e6a08b0c767863d66f7d4a9de80db5edc7db29be /channels/rdpdr | |
parent | Releasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff) | |
download | freerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip |
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'channels/rdpdr')
-rw-r--r-- | channels/rdpdr/client/rdpdr_main.c | 6 | ||||
-rw-r--r-- | channels/rdpdr/server/rdpdr_main.c | 9 |
2 files changed, 13 insertions, 2 deletions
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' diff --git a/channels/rdpdr/server/rdpdr_main.c b/channels/rdpdr/server/rdpdr_main.c index bad6e23..f5353e3 100644 --- a/channels/rdpdr/server/rdpdr_main.c +++ b/channels/rdpdr/server/rdpdr_main.c @@ -2278,7 +2278,10 @@ static UINT rdpdr_server_send_device_create_request(RdpdrServerContext* context, /* Convert the path to Unicode. */ if (Stream_Write_UTF16_String_From_UTF8(s, pathLength / sizeof(WCHAR), path, pathLength / sizeof(WCHAR), TRUE) < 0) + { + Stream_Free(s, TRUE); return ERROR_INTERNAL_ERROR; + } return rdpdr_seal_send_free_request(context, s); } @@ -2418,7 +2421,10 @@ static UINT rdpdr_server_send_device_query_directory_request(RdpdrServerContext* { if (Stream_Write_UTF16_String_From_UTF8(s, pathLength / sizeof(WCHAR), path, pathLength / sizeof(WCHAR), TRUE) < 0) + { + Stream_Free(s, TRUE); return ERROR_INTERNAL_ERROR; + } } return rdpdr_seal_send_free_request(context, s); @@ -2468,7 +2474,10 @@ static UINT rdpdr_server_send_device_file_rename_request(RdpdrServerContext* con { if (Stream_Write_UTF16_String_From_UTF8(s, pathLength / sizeof(WCHAR), path, pathLength / sizeof(WCHAR), TRUE) < 0) + { + Stream_Free(s, TRUE); return ERROR_INTERNAL_ERROR; + } } return rdpdr_seal_send_free_request(context, s); |