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
5b723235
Commit
5b723235
authored
Oct 05, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Check source pointer in StringFromGUID2.
parent
2d2edc9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
compobj.c
dlls/ole32/compobj.c
+1
-1
compobj.c
dlls/ole32/tests/compobj.c
+7
-0
No files found.
dlls/ole32/compobj.c
View file @
5b723235
...
...
@@ -1621,7 +1621,7 @@ INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
if
(
cmax
<
CHARS_IN_GUID
)
return
0
;
if
(
!
id
||
cmax
<
CHARS_IN_GUID
)
return
0
;
sprintfW
(
str
,
formatW
,
id
->
Data1
,
id
->
Data2
,
id
->
Data3
,
id
->
Data4
[
0
],
id
->
Data4
[
1
],
id
->
Data4
[
2
],
id
->
Data4
[
3
],
id
->
Data4
[
4
],
id
->
Data4
[
5
],
id
->
Data4
[
6
],
id
->
Data4
[
7
]
);
...
...
dlls/ole32/tests/compobj.c
View file @
5b723235
...
...
@@ -203,6 +203,13 @@ static void test_StringFromGUID2(void)
{
WCHAR
str
[
50
];
int
len
;
/* invalid pointer */
SetLastError
(
0xdeadbeef
);
len
=
StringFromGUID2
(
NULL
,
str
,
50
);
ok
(
len
==
0
,
"len: %d (expected 0)
\n
"
,
len
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %x
\n
"
,
GetLastError
());
/* Test corner cases for buffer size */
len
=
StringFromGUID2
(
&
CLSID_StdFont
,
str
,
50
);
ok
(
len
==
39
,
"len: %d (expected 39)
\n
"
,
len
);
...
...
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