Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c489356d
Commit
c489356d
authored
Jan 28, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Enforce path case in WM_DEVICECHANGE notifications.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
439d126a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
hotplug.c
dlls/dinput/tests/hotplug.c
+0
-2
pnp.c
dlls/ntoskrnl.exe/pnp.c
+7
-1
No files found.
dlls/dinput/tests/hotplug.c
View file @
c489356d
...
@@ -201,14 +201,12 @@ static LRESULT CALLBACK devnotify_wndproc( HWND hwnd, UINT msg, WPARAM wparam, L
...
@@ -201,14 +201,12 @@ static LRESULT CALLBACK devnotify_wndproc( HWND hwnd, UINT msg, WPARAM wparam, L
debugstr_guid
(
&
iface
->
dbcc_classguid
)
);
debugstr_guid
(
&
iface
->
dbcc_classguid
)
);
ok
(
iface
->
dbcc_size
>=
offsetof
(
DEV_BROADCAST_DEVICEINTERFACE_W
,
dbcc_name
[
wcslen
(
iface
->
dbcc_name
)
+
1
]
),
ok
(
iface
->
dbcc_size
>=
offsetof
(
DEV_BROADCAST_DEVICEINTERFACE_W
,
dbcc_name
[
wcslen
(
iface
->
dbcc_name
)
+
1
]
),
"got dbcc_size %u
\n
"
,
iface
->
dbcc_size
);
"got dbcc_size %u
\n
"
,
iface
->
dbcc_size
);
todo_wine
ok
(
!
wcsncmp
(
iface
->
dbcc_name
,
expect_prefix
,
wcslen
(
expect_prefix
)
),
ok
(
!
wcsncmp
(
iface
->
dbcc_name
,
expect_prefix
,
wcslen
(
expect_prefix
)
),
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
upper_end
=
wcschr
(
iface
->
dbcc_name
+
wcslen
(
expect_prefix
),
'#'
);
upper_end
=
wcschr
(
iface
->
dbcc_name
+
wcslen
(
expect_prefix
),
'#'
);
name_end
=
iface
->
dbcc_name
+
wcslen
(
iface
->
dbcc_name
)
+
1
;
name_end
=
iface
->
dbcc_name
+
wcslen
(
iface
->
dbcc_name
)
+
1
;
ok
(
!!
upper_end
,
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
ok
(
!!
upper_end
,
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
todo_wine
ok
(
all_upper
(
iface
->
dbcc_name
,
upper_end
),
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
ok
(
all_upper
(
iface
->
dbcc_name
,
upper_end
),
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
ok
(
all_lower
(
upper_end
,
name_end
),
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
ok
(
all_lower
(
upper_end
,
name_end
),
"got dbcc_name %s
\n
"
,
debugstr_w
(
iface
->
dbcc_name
)
);
...
...
dlls/ntoskrnl.exe/pnp.c
View file @
c489356d
...
@@ -698,11 +698,11 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
...
@@ -698,11 +698,11 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
size_t
namelen
=
name
->
Length
/
sizeof
(
WCHAR
);
size_t
namelen
=
name
->
Length
/
sizeof
(
WCHAR
);
DEV_BROADCAST_DEVICEINTERFACE_W
*
broadcast
;
DEV_BROADCAST_DEVICEINTERFACE_W
*
broadcast
;
WCHAR
*
path
,
*
refstr
,
*
p
,
*
upper_end
;
struct
device_interface
*
iface
;
struct
device_interface
*
iface
;
HANDLE
iface_key
,
control_key
;
HANDLE
iface_key
,
control_key
;
OBJECT_ATTRIBUTES
attr
=
{
0
};
OBJECT_ATTRIBUTES
attr
=
{
0
};
struct
wine_rb_entry
*
entry
;
struct
wine_rb_entry
*
entry
;
WCHAR
*
path
,
*
refstr
,
*
p
;
UNICODE_STRING
string
;
UNICODE_STRING
string
;
DWORD
data
=
enable
;
DWORD
data
=
enable
;
NTSTATUS
ret
;
NTSTATUS
ret
;
...
@@ -788,6 +788,12 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
...
@@ -788,6 +788,12 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
broadcast
->
dbcc_classguid
=
iface
->
interface_class
;
broadcast
->
dbcc_classguid
=
iface
->
interface_class
;
lstrcpynW
(
broadcast
->
dbcc_name
,
name
->
Buffer
,
namelen
+
1
);
lstrcpynW
(
broadcast
->
dbcc_name
,
name
->
Buffer
,
namelen
+
1
);
if
(
namelen
>
1
)
broadcast
->
dbcc_name
[
1
]
=
'\\'
;
if
(
namelen
>
1
)
broadcast
->
dbcc_name
[
1
]
=
'\\'
;
upper_end
=
wcschr
(
broadcast
->
dbcc_name
,
'#'
);
if
(
upper_end
)
upper_end
=
wcschr
(
upper_end
+
1
,
'#'
);
while
(
upper_end
&&
upper_end
--
!=
broadcast
->
dbcc_name
)
*
upper_end
=
towupper
(
*
upper_end
);
send_devicechange
(
enable
?
DBT_DEVICEARRIVAL
:
DBT_DEVICEREMOVECOMPLETE
,
broadcast
,
len
);
send_devicechange
(
enable
?
DBT_DEVICEARRIVAL
:
DBT_DEVICEREMOVECOMPLETE
,
broadcast
,
len
);
heap_free
(
broadcast
);
heap_free
(
broadcast
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment