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
000e1e0c
Commit
000e1e0c
authored
Nov 23, 2009
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Some missing error checking in FileMonikerImpl_CommonPrefixWith (Coverity).
parent
1667a246
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
filemoniker.c
dlls/ole32/filemoniker.c
+15
-3
No files found.
dlls/ole32/filemoniker.c
View file @
000e1e0c
...
...
@@ -960,20 +960,32 @@ FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** p
if
(
mkSys
==
MKSYS_FILEMONIKER
){
HRESULT
ret
;
CreateBindCtx
(
0
,
&
pbind
);
ret
=
CreateBindCtx
(
0
,
&
pbind
);
if
(
FAILED
(
ret
))
return
ret
;
/* create a string based on common part of the two paths */
IMoniker_GetDisplayName
(
iface
,
pbind
,
NULL
,
&
pathThis
);
IMoniker_GetDisplayName
(
pmkOther
,
pbind
,
NULL
,
&
pathOther
);
ret
=
IMoniker_GetDisplayName
(
iface
,
pbind
,
NULL
,
&
pathThis
);
if
(
FAILED
(
ret
))
return
ret
;
ret
=
IMoniker_GetDisplayName
(
pmkOther
,
pbind
,
NULL
,
&
pathOther
);
if
(
FAILED
(
ret
))
return
ret
;
nb1
=
FileMonikerImpl_DecomposePath
(
pathThis
,
&
stringTable1
);
if
(
FAILED
(
nb1
))
return
nb1
;
nb2
=
FileMonikerImpl_DecomposePath
(
pathOther
,
&
stringTable2
);
if
(
FAILED
(
nb2
))
return
nb2
;
if
(
nb1
==
0
||
nb2
==
0
)
return
MK_E_NOPREFIX
;
commonPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
(
min
(
lstrlenW
(
pathThis
),
lstrlenW
(
pathOther
))
+
1
));
if
(
!
commonPath
)
return
E_OUTOFMEMORY
;
*
commonPath
=
0
;
...
...
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