Welcome to mirror list, hosted at ThFree Co, Russian Federation.

0021-Filter-RDPDR-types-other-than-drives-on-windows-hotp.patch « patches « debian - gitlab.com/Remmina/FreeRDP-Ubuntu-PPA.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c0e6a48a71893485a242aea08d419577109c22c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From c37593d9fc84f6344381cbfcf0631d3798d169b0 Mon Sep 17 00:00:00 2001
From: Armin Novak <armin.novak@thincast.com>
Date: Tue, 9 Mar 2021 12:23:37 +0100
Subject: [PATCH 21/36] Filter RDPDR types other than drives on windows hotplug

(cherry picked from commit 6f599eabbedace4adc215186783deec680057003)
---
 channels/rdpdr/client/rdpdr_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c
index e59bf0f64..617ea4287 100644
--- a/channels/rdpdr/client/rdpdr_main.c
+++ b/channels/rdpdr/client/rdpdr_main.c
@@ -129,7 +129,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
 
 #elif _WIN32
 
-BOOL check_path(char* path)
+BOOL check_path(const char* path)
 {
 	UINT type = GetDriveTypeA(path);
 
@@ -244,6 +244,9 @@ LRESULT CALLBACK hotplug_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
 									device_ext = (DEVICE_DRIVE_EXT*)ListDictionary_GetItemValue(
 									    rdpdr->devman->devices, (void*)keys[j]);
 
+									if (device_ext->device.type != RDPDR_DTYP_FILESYSTEM)
+										continue;
+
 									if (device_ext->path[0] == drive_name_upper ||
 									    device_ext->path[0] == drive_name_lower)
 									{
-- 
2.30.2