Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ekaterine Papava
wine
Commits
2705e6c3
Commit
2705e6c3
authored
1 year ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
server: Also enforce the size of varargs data structures.
parent
2f3c8be5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/wine/server_protocol.h
+2
-1
2 additions, 1 deletion
include/wine/server_protocol.h
server/protocol.def
+1
-0
1 addition, 0 deletions
server/protocol.def
server/request.h
+18
-0
18 additions, 0 deletions
server/request.h
tools/make_requests
+21
-1
21 additions, 1 deletion
tools/make_requests
with
42 additions
and
2 deletions
include/wine/server_protocol.h
+
2
−
1
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 ### */
...
...
This diff is collapsed.
Click to expand it.
server/protocol.def
+
1
−
0
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
{
...
...
This diff is collapsed.
Click to expand it.
server/request.h
+
18
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
tools/make_requests
+
21
−
1
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment