Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fd3c7be0
Commit
fd3c7be0
authored
Jan 23, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Jan 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Allocate buffer on heap.
parent
a8a2ca72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
message.c
dlls/user32/message.c
+7
-6
No files found.
dlls/user32/message.c
View file @
fd3c7be0
...
...
@@ -2028,9 +2028,10 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
struct
received_message_info
info
,
*
old_info
;
unsigned
int
hw_id
=
0
;
/* id of previous hardware message */
char
local_buffer
[
256
];
void
*
buffer
=
local_buffer
;
size_t
buffer_size
=
sizeof
(
local_buffer
);
void
*
buffer
;
size_t
buffer_size
=
256
;
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buffer_size
)))
return
FALSE
;
if
(
!
first
&&
!
last
)
last
=
~
0
;
...
...
@@ -2070,7 +2071,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
if
(
res
)
{
if
(
buffer
!=
local_buffer
)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
if
(
res
!=
STATUS_BUFFER_OVERFLOW
)
return
FALSE
;
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buffer_size
)))
return
FALSE
;
continue
;
...
...
@@ -2163,7 +2164,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
thread_info
->
GetMessagePosVal
=
MAKELONG
(
info
.
msg
.
pt
.
x
,
info
.
msg
.
pt
.
y
);
thread_info
->
GetMessageTimeVal
=
info
.
msg
.
time
;
thread_info
->
GetMessageExtraInfoVal
=
msg_data
->
hardware
.
info
;
if
(
buffer
!=
local_buffer
)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HOOK_CallHooks
(
WH_GETMESSAGE
,
HC_ACTION
,
flags
&
PM_REMOVE
,
(
LPARAM
)
msg
,
TRUE
);
return
TRUE
;
}
...
...
@@ -2194,7 +2195,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
msg
->
pt
.
y
=
(
short
)
HIWORD
(
thread_info
->
GetMessagePosVal
);
thread_info
->
GetMessageTimeVal
=
info
.
msg
.
time
;
thread_info
->
GetMessageExtraInfoVal
=
0
;
if
(
buffer
!=
local_buffer
)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HOOK_CallHooks
(
WH_GETMESSAGE
,
HC_ACTION
,
flags
&
PM_REMOVE
,
(
LPARAM
)
msg
,
TRUE
);
return
TRUE
;
}
...
...
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