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
be40b01c
Commit
be40b01c
authored
Sep 20, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Align object attributes to a DWORD-boundary.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a6d89db6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
sync.c
dlls/ntdll/sync.c
+2
-0
server_protocol.h
include/wine/server_protocol.h
+1
-1
request.c
server/request.c
+4
-5
trace.c
server/trace.c
+1
-2
No files found.
dlls/ntdll/sync.c
View file @
be40b01c
...
@@ -114,6 +114,8 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
...
@@ -114,6 +114,8 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
}
}
else
if
(
attr
->
RootDirectory
)
return
STATUS_OBJECT_NAME_INVALID
;
else
if
(
attr
->
RootDirectory
)
return
STATUS_OBJECT_NAME_INVALID
;
len
=
(
len
+
3
)
&
~
3
;
/* DWORD-align the entire structure */
*
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
*
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
if
(
!*
ret
)
return
STATUS_NO_MEMORY
;
if
(
!*
ret
)
return
STATUS_NO_MEMORY
;
...
...
include/wine/server_protocol.h
View file @
be40b01c
...
@@ -6535,6 +6535,6 @@ union generic_reply
...
@@ -6535,6 +6535,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
struct
terminate_job_reply
terminate_job_reply
;
};
};
#define SERVER_PROTOCOL_VERSION 5
59
#define SERVER_PROTOCOL_VERSION 5
60
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/request.c
View file @
be40b01c
...
@@ -214,16 +214,15 @@ const struct object_attributes *get_req_object_attributes( const struct security
...
@@ -214,16 +214,15 @@ const struct object_attributes *get_req_object_attributes( const struct security
/* return a pointer to the request data following an object attributes structure */
/* return a pointer to the request data following an object attributes structure */
const
void
*
get_req_data_after_objattr
(
const
struct
object_attributes
*
attr
,
data_size_t
*
len
)
const
void
*
get_req_data_after_objattr
(
const
struct
object_attributes
*
attr
,
data_size_t
*
len
)
{
{
const
void
*
ptr
;
data_size_t
size
=
(
sizeof
(
*
attr
)
+
(
attr
->
sd_len
&
~
1
)
+
(
attr
->
name_len
&
~
1
)
+
3
)
&
~
3
;
if
(
attr
==
&
empty_attributes
)
if
(
attr
==
&
empty_attributes
||
size
>=
get_req_data_size
()
)
{
{
*
len
=
0
;
*
len
=
0
;
return
NULL
;
return
NULL
;
}
}
ptr
=
(
const
WCHAR
*
)(
attr
+
1
)
+
attr
->
sd_len
/
sizeof
(
WCHAR
)
+
attr
->
name_len
/
sizeof
(
WCHAR
);
*
len
=
get_req_data_size
()
-
size
;
*
len
=
get_req_data_size
()
-
((
const
char
*
)
ptr
-
(
const
char
*
)
get_req_data
());
return
(
const
char
*
)
get_req_data
()
+
size
;
return
ptr
;
}
}
/* write the remaining part of the reply */
/* write the remaining part of the reply */
...
...
server/trace.c
View file @
be40b01c
...
@@ -1119,8 +1119,7 @@ static void dump_varargs_object_attributes( const char *prefix, data_size_t size
...
@@ -1119,8 +1119,7 @@ static void dump_varargs_object_attributes( const char *prefix, data_size_t size
fprintf
(
stderr
,
",name=L
\"
"
);
fprintf
(
stderr
,
",name=L
\"
"
);
dump_strW
(
str
,
objattr
->
name_len
/
sizeof
(
WCHAR
),
stderr
,
"
\"\"
"
);
dump_strW
(
str
,
objattr
->
name_len
/
sizeof
(
WCHAR
),
stderr
,
"
\"\"
"
);
fputc
(
'\"'
,
stderr
);
fputc
(
'\"'
,
stderr
);
remove_data
(
((
sizeof
(
*
objattr
)
+
objattr
->
sd_len
)
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
)
+
remove_data
(
(
sizeof
(
*
objattr
)
+
(
objattr
->
sd_len
&
~
1
)
+
(
objattr
->
name_len
&
~
1
)
+
3
)
&
~
3
);
(
objattr
->
name_len
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
)
);
}
}
fputc
(
'}'
,
stderr
);
fputc
(
'}'
,
stderr
);
}
}
...
...
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