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
0e4be06c
Commit
0e4be06c
authored
Dec 29, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Handle NULL pointer in DllGetVersion() (Coverity).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57bfebfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
shlwapi_main.c
dlls/shlwapi/shlwapi_main.c
+5
-2
ordinal.c
dlls/shlwapi/tests/ordinal.c
+12
-0
No files found.
dlls/shlwapi/shlwapi_main.c
View file @
0e4be06c
...
...
@@ -94,6 +94,9 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
TRACE
(
"(%p)
\n
"
,
pdvi
);
if
(
!
pdvi
)
return
E_INVALIDARG
;
switch
(
pdvi2
->
info1
.
cbSize
)
{
case
sizeof
(
DLLVERSIONINFO2
):
...
...
@@ -107,7 +110,7 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
pdvi2
->
info1
.
dwPlatformID
=
DLLVER_PLATFORM_WINDOWS
;
return
S_OK
;
}
if
(
pdvi
)
WARN
(
"pdvi->cbSize = %d, unhandled
\n
"
,
pdvi2
->
info1
.
cbSize
);
WARN
(
"pdvi->cbSize = %d, unhandled
\n
"
,
pdvi2
->
info1
.
cbSize
);
return
E_INVALIDARG
;
}
dlls/shlwapi/tests/ordinal.c
View file @
0e4be06c
...
...
@@ -70,6 +70,7 @@ static HRESULT (WINAPI *pSKDeleteValueW)(DWORD, LPCWSTR, LPCWSTR);
static
HRESULT
(
WINAPI
*
pSKAllocValueW
)(
DWORD
,
LPCWSTR
,
LPCWSTR
,
DWORD
*
,
void
**
,
DWORD
*
);
static
HWND
(
WINAPI
*
pSHSetParentHwnd
)(
HWND
,
HWND
);
static
HRESULT
(
WINAPI
*
pIUnknown_GetClassID
)(
IUnknown
*
,
CLSID
*
);
static
HRESULT
(
WINAPI
*
pDllGetVersion
)(
DLLVERSIONINFO2
*
);
static
HMODULE
hmlang
;
static
HRESULT
(
WINAPI
*
pLcidToRfc1766A
)(
LCID
,
LPSTR
,
INT
);
...
...
@@ -3073,6 +3074,8 @@ static void init_pointers(void)
MAKEFUNC
(
SKDeleteValueW
,
518
);
MAKEFUNC
(
SKAllocValueW
,
519
);
#undef MAKEFUNC
pDllGetVersion
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"DllGetVersion"
);
}
static
void
test_SHSetParentHwnd
(
void
)
...
...
@@ -3246,6 +3249,14 @@ if (0) /* crashes on native systems */
"got wrong clsid %s
\n
"
,
wine_dbgstr_guid
(
&
clsid
));
}
static
void
test_DllGetVersion
(
void
)
{
HRESULT
hr
;
hr
=
pDllGetVersion
(
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
}
START_TEST
(
ordinal
)
{
char
**
argv
;
...
...
@@ -3301,6 +3312,7 @@ START_TEST(ordinal)
test_SHGetShellKey
();
test_SHSetParentHwnd
();
test_IUnknown_GetClassID
();
test_DllGetVersion
();
FreeLibrary
(
hshell32
);
FreeLibrary
(
hmlang
);
...
...
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