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
190f9d65
Commit
190f9d65
authored
Oct 04, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Oct 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Don't crash when setting CRYPT_KEY_PROV_INFO with empty names.
parent
836cf139
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
cert.c
dlls/crypt32/cert.c
+24
-8
No files found.
dlls/crypt32/cert.c
View file @
190f9d65
...
...
@@ -367,12 +367,22 @@ static void CRYPT_CopyKeyProvInfo(PCRYPT_KEY_PROV_INFO to,
DWORD
i
;
LPBYTE
nextData
=
(
LPBYTE
)
to
+
sizeof
(
CRYPT_KEY_PROV_INFO
);
to
->
pwszContainerName
=
(
LPWSTR
)
nextData
;
lstrcpyW
(
to
->
pwszContainerName
,
from
->
pwszContainerName
);
nextData
+=
(
lstrlenW
(
from
->
pwszContainerName
)
+
1
)
*
sizeof
(
WCHAR
);
to
->
pwszProvName
=
(
LPWSTR
)
nextData
;
lstrcpyW
(
to
->
pwszProvName
,
from
->
pwszProvName
);
nextData
+=
(
lstrlenW
(
from
->
pwszProvName
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
from
->
pwszContainerName
)
{
to
->
pwszContainerName
=
(
LPWSTR
)
nextData
;
lstrcpyW
(
to
->
pwszContainerName
,
from
->
pwszContainerName
);
nextData
+=
(
lstrlenW
(
from
->
pwszContainerName
)
+
1
)
*
sizeof
(
WCHAR
);
}
else
to
->
pwszContainerName
=
NULL
;
if
(
from
->
pwszProvName
)
{
to
->
pwszProvName
=
(
LPWSTR
)
nextData
;
lstrcpyW
(
to
->
pwszProvName
,
from
->
pwszProvName
);
nextData
+=
(
lstrlenW
(
from
->
pwszProvName
)
+
1
)
*
sizeof
(
WCHAR
);
}
else
to
->
pwszProvName
=
NULL
;
to
->
dwProvType
=
from
->
dwProvType
;
to
->
dwFlags
=
from
->
dwFlags
;
to
->
cProvParam
=
from
->
cProvParam
;
...
...
@@ -397,8 +407,14 @@ static BOOL CertContext_SetKeyProvInfoProperty(PCONTEXT_PROPERTY_LIST properties
LPBYTE
buf
=
NULL
;
DWORD
size
=
sizeof
(
CRYPT_KEY_PROV_INFO
),
i
,
containerSize
,
provNameSize
;
containerSize
=
(
lstrlenW
(
info
->
pwszContainerName
)
+
1
)
*
sizeof
(
WCHAR
);
provNameSize
=
(
lstrlenW
(
info
->
pwszProvName
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
info
->
pwszContainerName
)
containerSize
=
(
lstrlenW
(
info
->
pwszContainerName
)
+
1
)
*
sizeof
(
WCHAR
);
else
containerSize
=
0
;
if
(
info
->
pwszProvName
)
provNameSize
=
(
lstrlenW
(
info
->
pwszProvName
)
+
1
)
*
sizeof
(
WCHAR
);
else
provNameSize
=
0
;
size
+=
containerSize
+
provNameSize
;
for
(
i
=
0
;
i
<
info
->
cProvParam
;
i
++
)
size
+=
sizeof
(
CRYPT_KEY_PROV_PARAM
)
+
info
->
rgProvParam
[
i
].
cbData
;
...
...
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