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
92747f25
Commit
92747f25
authored
Oct 28, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CreateItemMoniker may get NULL as szDelim, some cleanups.
parent
52475287
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
itemmoniker.c
dlls/ole32/itemmoniker.c
+16
-7
No files found.
dlls/ole32/itemmoniker.c
View file @
92747f25
...
...
@@ -342,8 +342,9 @@ HRESULT WINAPI ItemMonikerImpl_GetSizeMax(IMoniker* iface,
HRESULT
WINAPI
ItemMonikerImpl_Construct
(
ItemMonikerImpl
*
This
,
LPCOLESTR
lpszDelim
,
LPCOLESTR
lpszItem
)
{
int
sizeStr1
=
lstrlenW
(
lpszItem
);
int
sizeStr2
=
lstrlenW
(
lpszDelim
);
int
sizeStr1
=
lstrlenW
(
lpszItem
),
sizeStr2
;
static
const
OLECHAR
emptystr
[
1
];
LPCOLESTR
delim
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
lpszItem
);
...
...
@@ -353,14 +354,22 @@ HRESULT WINAPI ItemMonikerImpl_Construct(ItemMonikerImpl* This, LPCOLESTR lpszDe
This
->
ref
=
0
;
This
->
itemName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
sizeStr1
+
1
));
This
->
itemDelimiter
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
sizeStr2
+
1
));
if
((
This
->
itemName
==
NULL
)
||
(
This
->
itemDelimiter
==
NULL
))
if
(
!
This
->
itemName
)
return
E_OUTOFMEMORY
;
strcpyW
(
This
->
itemName
,
lpszItem
);
strcpyW
(
This
->
itemDelimiter
,
lpszDelim
);
if
(
!
lpszDelim
)
FIXME
(
"lpszDelim is NULL. Using empty string which is possibly wrong.
\n
"
);
delim
=
lpszDelim
?
lpszDelim
:
emptystr
;
sizeStr2
=
strlenW
(
delim
);
This
->
itemDelimiter
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
sizeStr2
+
1
));
if
(
!
This
->
itemDelimiter
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
itemName
);
return
E_OUTOFMEMORY
;
}
strcpyW
(
This
->
itemDelimiter
,
delim
);
return
S_OK
;
}
...
...
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