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
ed0520e2
Commit
ed0520e2
authored
Jan 07, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Fix uninitialized data access in tests (Valgrind).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
23d3b123
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
ordinal.c
dlls/shlwapi/ordinal.c
+1
-1
ordinal.c
dlls/shlwapi/tests/ordinal.c
+21
-20
No files found.
dlls/shlwapi/ordinal.c
View file @
ed0520e2
...
...
@@ -4842,7 +4842,7 @@ typedef struct SHELL_USER_PERMISSION { /* ...and this should be in shlwapi.h */
* NOTES
* Call should free returned descriptor with LocalFree
*/
PSECURITY_DESCRIPTOR
WINAPI
GetShellSecurityDescriptor
(
PSHELL_USER_PERMISSION
*
apUserPerm
,
int
cUserPerm
)
PSECURITY_DESCRIPTOR
WINAPI
GetShellSecurityDescriptor
(
const
PSHELL_USER_PERMISSION
*
apUserPerm
,
int
cUserPerm
)
{
PSID
*
sidlist
;
PSID
cur_user
=
NULL
;
...
...
dlls/shlwapi/tests/ordinal.c
View file @
ed0520e2
...
...
@@ -72,6 +72,23 @@ static HWND (WINAPI *pSHSetParentHwnd)(HWND, HWND);
static
HRESULT
(
WINAPI
*
pIUnknown_GetClassID
)(
IUnknown
*
,
CLSID
*
);
static
HRESULT
(
WINAPI
*
pDllGetVersion
)(
DLLVERSIONINFO2
*
);
typedef
struct
SHELL_USER_SID
{
SID_IDENTIFIER_AUTHORITY
sidAuthority
;
DWORD
dwUserGroupID
;
DWORD
dwUserID
;
}
SHELL_USER_SID
,
*
PSHELL_USER_SID
;
typedef
struct
SHELL_USER_PERMISSION
{
SHELL_USER_SID
susID
;
DWORD
dwAccessType
;
BOOL
fInherit
;
DWORD
dwAccessMask
;
DWORD
dwInheritMask
;
DWORD
dwInheritAccessMask
;
}
SHELL_USER_PERMISSION
,
*
PSHELL_USER_PERMISSION
;
static
SECURITY_DESCRIPTOR
*
(
WINAPI
*
pGetShellSecurityDescriptor
)(
const
SHELL_USER_PERMISSION
**
,
int
);
static
HMODULE
hmlang
;
static
HRESULT
(
WINAPI
*
pLcidToRfc1766A
)(
LCID
,
LPSTR
,
INT
);
...
...
@@ -676,40 +693,23 @@ static void test_fdsa(void)
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
typedef
struct
SHELL_USER_SID
{
SID_IDENTIFIER_AUTHORITY
sidAuthority
;
DWORD
dwUserGroupID
;
DWORD
dwUserID
;
}
SHELL_USER_SID
,
*
PSHELL_USER_SID
;
typedef
struct
SHELL_USER_PERMISSION
{
SHELL_USER_SID
susID
;
DWORD
dwAccessType
;
BOOL
fInherit
;
DWORD
dwAccessMask
;
DWORD
dwInheritMask
;
DWORD
dwInheritAccessMask
;
}
SHELL_USER_PERMISSION
,
*
PSHELL_USER_PERMISSION
;
static
void
test_GetShellSecurityDescriptor
(
void
)
{
SHELL_USER_PERMISSION
supCurrentUserFull
=
{
static
const
SHELL_USER_PERMISSION
supCurrentUserFull
=
{
{
{
SECURITY_NULL_SID_AUTHORITY
},
0
,
0
},
ACCESS_ALLOWED_ACE_TYPE
,
FALSE
,
GENERIC_ALL
,
0
,
0
};
#define MY_INHERITANCE 0xBE
/* invalid value to proof behavior */
SHELL_USER_PERMISSION
supEveryoneDenied
=
{
static
const
SHELL_USER_PERMISSION
supEveryoneDenied
=
{
{
{
SECURITY_WORLD_SID_AUTHORITY
},
SECURITY_WORLD_RID
,
0
},
ACCESS_DENIED_ACE_TYPE
,
TRUE
,
GENERIC_WRITE
,
MY_INHERITANCE
|
0xDEADBA00
,
GENERIC_READ
};
PSHELL_USER_PERMISSION
rgsup
[
2
]
=
{
const
SHELL_USER_PERMISSION
*
rgsup
[
2
]
=
{
&
supCurrentUserFull
,
&
supEveryoneDenied
,
};
SECURITY_DESCRIPTOR
*
psd
;
SECURITY_DESCRIPTOR
*
(
WINAPI
*
pGetShellSecurityDescriptor
)(
PSHELL_USER_PERMISSION
*
,
int
);
void
*
pChrCmpIW
=
GetProcAddress
(
hShlwapi
,
"ChrCmpIW"
);
pGetShellSecurityDescriptor
=
(
void
*
)
GetProcAddress
(
hShlwapi
,(
char
*
)
475
);
if
(
!
pGetShellSecurityDescriptor
)
{
win_skip
(
"GetShellSecurityDescriptor not available
\n
"
);
...
...
@@ -3064,6 +3064,7 @@ static void init_pointers(void)
MAKEFUNC
(
SHFormatDateTimeA
,
353
);
MAKEFUNC
(
SHFormatDateTimeW
,
354
);
MAKEFUNC
(
SHIShellFolder_EnumObjects
,
404
);
MAKEFUNC
(
GetShellSecurityDescriptor
,
475
);
MAKEFUNC
(
SHGetObjectCompatFlags
,
476
);
MAKEFUNC
(
IUnknown_QueryServiceExec
,
484
);
MAKEFUNC
(
SHGetShellKey
,
491
);
...
...
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