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
7c06862c
Commit
7c06862c
authored
May 23, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
May 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Handle DWORD-sized blob indices when loading the public key.
parent
0b82e284
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
assembly.c
dlls/fusion/assembly.c
+12
-7
No files found.
dlls/fusion/assembly.c
View file @
7c06862c
...
...
@@ -825,23 +825,22 @@ PEKIND assembly_get_architecture(ASSEMBLY *assembly)
return
peI386
;
/* x86 assembly */
}
static
BYTE
*
assembly_get_blob
(
ASSEMBLY
*
assembly
,
WORD
index
,
ULONG
*
size
)
static
BYTE
*
assembly_get_blob
(
ASSEMBLY
*
assembly
,
D
WORD
index
,
ULONG
*
size
)
{
return
GetData
(
&
assembly
->
blobs
[
index
],
size
);
}
HRESULT
assembly_get_pubkey_token
(
ASSEMBLY
*
assembly
,
LPWSTR
*
token
)
{
ASSEMBLYTABLE
*
asmtbl
;
ULONG
i
,
size
;
LONG
offset
;
BYTE
*
hashdata
;
BYTE
*
hashdata
,
*
pubkey
,
*
ptr
;
HCRYPTPROV
crypt
;
HCRYPTHASH
hash
;
BYTE
*
pubkey
;
BYTE
tokbytes
[
BYTES_PER_TOKEN
];
HRESULT
hr
=
E_FAIL
;
LPWSTR
tok
;
DWORD
idx
;
*
token
=
NULL
;
...
...
@@ -849,11 +848,17 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token)
if
(
offset
==
-
1
)
return
E_FAIL
;
asmtbl
=
assembly_data_offset
(
assembly
,
offset
);
if
(
!
asmtbl
)
ptr
=
assembly_data_offset
(
assembly
,
offset
);
if
(
!
ptr
)
return
E_FAIL
;
pubkey
=
assembly_get_blob
(
assembly
,
asmtbl
->
PublicKey
,
&
size
);
ptr
+=
FIELD_OFFSET
(
ASSEMBLYTABLE
,
PublicKey
);
if
(
assembly
->
blobsz
==
sizeof
(
DWORD
))
idx
=
*
(
DWORD
*
)
ptr
;
else
idx
=
*
(
WORD
*
)
ptr
;
pubkey
=
assembly_get_blob
(
assembly
,
idx
,
&
size
);
if
(
!
CryptAcquireContextA
(
&
crypt
,
NULL
,
NULL
,
PROV_RSA_FULL
,
CRYPT_VERIFYCONTEXT
))
...
...
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