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
6754c355
Commit
6754c355
authored
Mar 28, 2014
by
Thomas Faber
Committed by
Alexandre Julliard
Mar 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fix uneven length handling in CredUnmarshalCredential.
parent
309b5366
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
cred.c
dlls/advapi32/cred.c
+1
-1
cred.c
dlls/advapi32/tests/cred.c
+18
-0
No files found.
dlls/advapi32/cred.c
View file @
6754c355
...
...
@@ -2100,7 +2100,7 @@ BOOL WINAPI CredUnmarshalCredentialW( LPCWSTR cred, PCRED_MARSHAL_TYPE type, PVO
DWORD
size
;
if
(
len
<
9
||
!
cred_decode
(
cred
+
3
,
6
,
(
char
*
)
&
size
)
||
!
size
||
size
%
sizeof
(
WCHAR
)
||
size
>
INT_MAX
)
size
%
sizeof
(
WCHAR
)
||
len
-
6
!=
(
size
*
4
+
2
)
/
3
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
...
...
dlls/advapi32/tests/cred.c
View file @
6754c355
...
...
@@ -566,6 +566,8 @@ static void test_CredUnmarshalCredentialA(void)
static
const
UCHAR
cert_empty
[
CERT_HASH_LENGTH
]
=
{
0
};
static
const
UCHAR
cert_wine
[
CERT_HASH_LENGTH
]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
tW
[]
=
{
't'
,
0
};
static
const
WCHAR
teW
[]
=
{
't'
,
'e'
,
0
};
static
const
WCHAR
tesW
[]
=
{
't'
,
'e'
,
's'
,
0
};
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
void
*
p
;
CERT_CREDENTIAL_INFO
*
cert
;
...
...
@@ -593,6 +595,8 @@ static void test_CredUnmarshalCredentialA(void)
{
"@@-"
,
63
,
NULL
},
{
"@@B"
,
CertCredential
,
NULL
},
{
"@@BA"
,
CertCredential
,
NULL
},
{
"@@BAAAAAAAAAAAAAAAAAAAAAAAAAA"
,
CertCredential
,
NULL
},
{
"@@BAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
,
CertCredential
,
NULL
},
{
"@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA"
,
CertCredential
,
cert_empty
},
{
"@@BXlmblBAAAAAAAAAAAAAAAAAAAAA"
,
CertCredential
,
cert_wine
},
{
"@@C"
,
UsernameTargetCredential
,
NULL
},
...
...
@@ -601,6 +605,20 @@ static void test_CredUnmarshalCredentialA(void)
{
"@@CAAAAAA0B"
,
UsernameTargetCredential
,
NULL
},
{
"@@CAAAAAA0BA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CCAAAAA0BA"
,
UsernameTargetCredential
,
tW
},
{
"@@CEAAAAA0BA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CEAAAAA0BAd"
,
UsernameTargetCredential
,
NULL
},
{
"@@CEAAAAA0BAdA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CEAAAAA0BQZAA"
,
UsernameTargetCredential
,
teW
},
{
"@@CEAAAAA0BQZAQ"
,
UsernameTargetCredential
,
teW
},
{
"@@CEAAAAA0BQZAg"
,
UsernameTargetCredential
,
teW
},
{
"@@CEAAAAA0BQZAw"
,
UsernameTargetCredential
,
teW
},
{
"@@CEAAAAA0BQZAAA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CGAAAAA0BQZAMH"
,
UsernameTargetCredential
,
NULL
},
{
"@@CGAAAAA0BQZAMHA"
,
UsernameTargetCredential
,
tesW
},
{
"@@CGAAAAA0BQZAMHAA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CCAAAAA0BAA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CBAAAAA0BAA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CAgAAAA0BAA"
,
UsernameTargetCredential
,
NULL
},
{
"@@CIAAAAA0BQZAMHA0BA"
,
UsernameTargetCredential
,
testW
},
{
"@@CA-----0BQZAMHA0BA"
,
UsernameTargetCredential
,
NULL
},
};
...
...
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