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
2aebb568
Commit
2aebb568
authored
Jan 31, 2009
by
Marcus Meissner
Committed by
Alexandre Julliard
Feb 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmloader: Fixed some pointer read/write checks (Coverity).
parent
fc3b99b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
container.c
dlls/dmloader/container.c
+7
-21
No files found.
dlls/dmloader/container.c
View file @
2aebb568
...
...
@@ -125,29 +125,15 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IDirectMusicContainer_EnumObject
TRACE
(
"(%p, %s, %d, %p, %p)
\n
"
,
This
,
debugstr_dmguid
(
rguidClass
),
dwIndex
,
pDesc
,
pwszAlias
);
/* check if we can write to whole pDesc */
if
(
pDesc
)
{
if
(
IsBadReadPtr
(
pDesc
,
sizeof
(
DWORD
)))
{
ERR
(
": pDesc->dwSize bad read pointer
\n
"
);
return
E_POINTER
;
}
if
(
pDesc
->
dwSize
!=
sizeof
(
DMUS_OBJECTDESC
))
{
ERR
(
": invalid pDesc->dwSize
\n
"
);
return
E_INVALIDARG
;
}
if
(
IsBadWritePtr
(
pDesc
,
sizeof
(
DMUS_OBJECTDESC
)))
{
ERR
(
": pDesc bad write pointer
\n
"
);
return
E_POINTER
;
}
}
/* check if wszAlias is big enough */
if
(
pwszAlias
&&
IsBadWritePtr
(
pwszAlias
,
DMUS_MAX_FILENAME_SIZE
))
{
ERR
(
": wszAlias bad write pointer
\n
"
);
return
E_POINTER
;
if
(
!
pDesc
)
return
E_POINTER
;
if
(
pDesc
->
dwSize
!=
sizeof
(
DMUS_OBJECTDESC
))
{
ERR
(
": invalid pDesc->dwSize %d
\n
"
,
pDesc
->
dwSize
);
return
E_INVALIDARG
;
}
DM_STRUCT_INIT
(
pDesc
);
LIST_FOR_EACH
(
pEntry
,
This
->
pContainedObjects
)
{
pContainedObject
=
LIST_ENTRY
(
pEntry
,
WINE_CONTAINER_ENTRY
,
entry
);
...
...
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