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
b5ed5389
Commit
b5ed5389
authored
Aug 05, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Avoid reallocating rawinput device array with zero size.
It actually frees the pointer.
parent
28aa321f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
rawinput.c
dlls/win32u/rawinput.c
+6
-0
No files found.
dlls/win32u/rawinput.c
View file @
b5ed5389
...
@@ -856,6 +856,12 @@ BOOL WINAPI NtUserRegisterRawInputDevices( const RAWINPUTDEVICE *devices, UINT d
...
@@ -856,6 +856,12 @@ BOOL WINAPI NtUserRegisterRawInputDevices( const RAWINPUTDEVICE *devices, UINT d
pthread_mutex_lock
(
&
rawinput_mutex
);
pthread_mutex_lock
(
&
rawinput_mutex
);
if
(
!
registered_device_count
&&
!
device_count
)
{
pthread_mutex_unlock
(
&
rawinput_mutex
);
return
TRUE
;
}
size
=
(
SIZE_T
)
device_size
*
(
registered_device_count
+
device_count
);
size
=
(
SIZE_T
)
device_size
*
(
registered_device_count
+
device_count
);
registered_devices
=
realloc
(
registered_devices
,
size
);
registered_devices
=
realloc
(
registered_devices
,
size
);
if
(
registered_devices
)
for
(
i
=
0
;
i
<
device_count
;
++
i
)
register_rawinput_device
(
devices
+
i
);
if
(
registered_devices
)
for
(
i
=
0
;
i
<
device_count
;
++
i
)
register_rawinput_device
(
devices
+
i
);
...
...
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