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
2ec1e4a3
Commit
2ec1e4a3
authored
Jan 25, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Fix buffer overflow in UUID tests.
parent
7fcc9629
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
rpc.c
dlls/rpcrt4/tests/rpc.c
+6
-6
No files found.
dlls/rpcrt4/tests/rpc.c
View file @
2ec1e4a3
...
...
@@ -764,9 +764,9 @@ static void test_RpcStringBindingFromBinding(void)
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree failed with error %u
\n
"
,
status
);
}
static
char
*
printGuid
(
char
*
buf
,
const
UUID
*
guid
)
static
char
*
printGuid
(
char
*
buf
,
int
size
,
const
UUID
*
guid
)
{
s
printf
(
buf
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}
\n
"
,
s
nprintf
(
buf
,
size
,
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}
"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
...
...
@@ -792,8 +792,8 @@ static void test_UuidCreate(void)
int
i
;
char
buf
[
39
];
memcpy
(
&
and
,
&
guid
,
sizeof
(
guid
))
;
memcpy
(
&
or
,
&
guid
,
sizeof
(
guid
))
;
and
=
guid
;
or
=
guid
;
/* Generate a bunch of UUIDs and mask them. By the end, we expect
* every randomly generated bit to have been zero at least once,
* resulting in no bits set in the and mask except those which are not
...
...
@@ -814,9 +814,9 @@ static void test_UuidCreate(void)
*
dst
|=
*
src
;
}
ok
(
UuidEqual
(
&
and
,
&
v4and
,
&
rslt
),
"unexpected bits set in V4 UUID: %s
\n
"
,
printGuid
(
buf
,
&
and
));
"unexpected bits set in V4 UUID: %s
\n
"
,
printGuid
(
buf
,
sizeof
(
buf
),
&
and
));
ok
(
UuidEqual
(
&
or
,
&
v4or
,
&
rslt
),
"unexpected bits set in V4 UUID: %s
\n
"
,
printGuid
(
buf
,
&
or
));
"unexpected bits set in V4 UUID: %s
\n
"
,
printGuid
(
buf
,
sizeof
(
buf
),
&
or
));
}
else
{
...
...
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