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
2705e6c3
Commit
2705e6c3
authored
Jun 13, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Also enforce the size of varargs data structures.
parent
2f3c8be5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
2 deletions
+42
-2
server_protocol.h
include/wine/server_protocol.h
+2
-1
protocol.def
server/protocol.def
+1
-0
request.h
server/request.h
+18
-0
make_requests
tools/make_requests
+21
-1
No files found.
include/wine/server_protocol.h
View file @
2705e6c3
...
...
@@ -456,6 +456,7 @@ typedef union
{
enum
select_op
op
;
obj_handle_t
handles
[
MAXIMUM_WAIT_OBJECTS
];
int
__pad
;
}
wait
;
struct
{
...
...
@@ -6413,7 +6414,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 77
4
#define SERVER_PROTOCOL_VERSION 77
5
/* ### protocol_version end ### */
...
...
server/protocol.def
View file @
2705e6c3
...
...
@@ -472,6 +472,7 @@ typedef union
{
enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
int __pad;
} wait;
struct
{
...
...
server/request.h
View file @
2705e6c3
...
...
@@ -689,13 +689,17 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
C_ASSERT
(
sizeof
(
abstime_t
)
==
8
);
C_ASSERT
(
sizeof
(
affinity_t
)
==
8
);
C_ASSERT
(
sizeof
(
apc_call_t
)
==
48
);
C_ASSERT
(
sizeof
(
apc_param_t
)
==
8
);
C_ASSERT
(
sizeof
(
apc_result_t
)
==
40
);
C_ASSERT
(
sizeof
(
async_data_t
)
==
40
);
C_ASSERT
(
sizeof
(
atom_t
)
==
4
);
C_ASSERT
(
sizeof
(
char
)
==
1
);
C_ASSERT
(
sizeof
(
client_ptr_t
)
==
8
);
C_ASSERT
(
sizeof
(
context_t
)
==
1720
);
C_ASSERT
(
sizeof
(
cursor_pos_t
)
==
24
);
C_ASSERT
(
sizeof
(
data_size_t
)
==
4
);
C_ASSERT
(
sizeof
(
debug_event_t
)
==
160
);
C_ASSERT
(
sizeof
(
file_pos_t
)
==
8
);
C_ASSERT
(
sizeof
(
generic_map_t
)
==
16
);
C_ASSERT
(
sizeof
(
hw_input_t
)
==
40
);
...
...
@@ -704,17 +708,31 @@ C_ASSERT( sizeof(ioctl_code_t) == 4 );
C_ASSERT
(
sizeof
(
irp_params_t
)
==
32
);
C_ASSERT
(
sizeof
(
lparam_t
)
==
8
);
C_ASSERT
(
sizeof
(
mem_size_t
)
==
8
);
C_ASSERT
(
sizeof
(
message_data_t
)
==
56
);
C_ASSERT
(
sizeof
(
mod_handle_t
)
==
8
);
C_ASSERT
(
sizeof
(
obj_handle_t
)
==
4
);
C_ASSERT
(
sizeof
(
pe_image_info_t
)
==
80
);
C_ASSERT
(
sizeof
(
process_id_t
)
==
4
);
C_ASSERT
(
sizeof
(
property_data_t
)
==
16
);
C_ASSERT
(
sizeof
(
rectangle_t
)
==
16
);
C_ASSERT
(
sizeof
(
select_op_t
)
==
264
);
C_ASSERT
(
sizeof
(
short
int
)
==
2
);
C_ASSERT
(
sizeof
(
startup_info_t
)
==
92
);
C_ASSERT
(
sizeof
(
struct
filesystem_event
)
==
12
);
C_ASSERT
(
sizeof
(
struct
handle_info
)
==
20
);
C_ASSERT
(
sizeof
(
struct
luid
)
==
8
);
C_ASSERT
(
sizeof
(
struct
luid_attr
)
==
12
);
C_ASSERT
(
sizeof
(
struct
object_attributes
)
==
16
);
C_ASSERT
(
sizeof
(
struct
object_type_info
)
==
44
);
C_ASSERT
(
sizeof
(
struct
process_info
)
==
40
);
C_ASSERT
(
sizeof
(
struct
rawinput_device
)
==
12
);
C_ASSERT
(
sizeof
(
struct
thread_info
)
==
40
);
C_ASSERT
(
sizeof
(
thread_id_t
)
==
4
);
C_ASSERT
(
sizeof
(
timeout_t
)
==
8
);
C_ASSERT
(
sizeof
(
unsigned
char
)
==
1
);
C_ASSERT
(
sizeof
(
unsigned
int
)
==
4
);
C_ASSERT
(
sizeof
(
unsigned
short
)
==
2
);
C_ASSERT
(
sizeof
(
user_apc_t
)
==
40
);
C_ASSERT
(
sizeof
(
user_handle_t
)
==
4
);
C_ASSERT
(
FIELD_OFFSET
(
struct
new_process_request
,
token
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
new_process_request
,
debug
)
==
16
);
...
...
tools/make_requests
View file @
2705e6c3
...
...
@@ -52,6 +52,25 @@ my %formats =
"generic_map_t"
=>
[
16
,
4
,
"&dump_generic_map"
],
"ioctl_code_t"
=>
[
4
,
4
,
"&dump_ioctl_code"
],
"hw_input_t"
=>
[
40
,
8
,
"&dump_hw_input"
],
# varargs-only structures
"apc_call_t"
=>
[
48
,
8
],
"context_t"
=>
[
1720
,
8
],
"cursor_pos_t"
=>
[
24
,
8
],
"debug_event_t"
=>
[
160
,
8
],
"message_data_t"
=>
[
56
,
8
],
"pe_image_info_t"
=>
[
80
,
8
],
"property_data_t"
=>
[
16
,
8
],
"select_op_t"
=>
[
264
,
8
],
"startup_info_t"
=>
[
92
,
4
],
"user_apc_t"
=>
[
40
,
8
],
"struct filesystem_event"
=>
[
12
,
4
],
"struct handle_info"
=>
[
20
,
4
],
"struct luid_attr"
=>
[
12
,
4
],
"struct object_attributes"
=>
[
16
,
4
],
"struct object_type_info"
=>
[
44
,
4
],
"struct process_info"
=>
[
40
,
8
],
"struct rawinput_device"
=>
[
12
,
4
],
"struct thread_info"
=>
[
40
,
8
],
);
my
@requests
=
();
...
...
@@ -479,7 +498,8 @@ push @request_lines, "};\n\n";
foreach
my
$type
(
sort
keys
%
formats
)
{
my
$size
=
$
{
$formats
{
$type
}}[
0
];
my
(
$size
,
$align
)
=
@
{
$formats
{
$type
}};
die
"$type: invalid size $size for alignment $align"
if
$size
%
$align
;
push
@request_lines
,
"C_ASSERT( sizeof($type) == $size );\n"
;
}
push
@request_lines
,
@asserts
;
...
...
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