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
159a3693
Commit
159a3693
authored
Sep 17, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Set bytes decoded in all success paths.
parent
7ecf5bec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
decode.c
dlls/crypt32/decode.c
+8
-8
No files found.
dlls/crypt32/decode.c
View file @
159a3693
...
...
@@ -457,6 +457,8 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
bytesNeeded
+=
items
[
i
].
size
;
structSize
+=
items
[
i
].
minSize
;
}
if
(
ret
&&
pcbDecoded
)
*
pcbDecoded
=
1
+
lenBytes
+
cbDecoded
;
if
(
!
pvStructInfo
)
*
pcbStructInfo
=
bytesNeeded
;
else
if
((
ret
=
CRYPT_DecodeEnsureSpace
(
dwFlags
,
...
...
@@ -474,8 +476,6 @@ static BOOL CRYPT_AsnDecodeSequence(DWORD dwCertEncodingType,
ret
=
CRYPT_AsnDecodeSequenceItems
(
dwFlags
,
items
,
cItem
,
ptr
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
nextData
,
&
cbDecoded
);
if
(
ret
&&
pcbDecoded
)
*
pcbDecoded
=
1
+
lenBytes
+
cbDecoded
;
}
}
}
...
...
@@ -601,6 +601,8 @@ static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc,
}
if
(
ret
)
{
if
(
pcbDecoded
)
*
pcbDecoded
=
decoded
;
if
(
!
pvStructInfo
)
*
pcbStructInfo
=
bytesNeeded
;
else
if
((
ret
=
CRYPT_DecodeEnsureSpace
(
dwFlags
,
...
...
@@ -611,8 +613,6 @@ static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc,
const
BYTE
*
ptr
;
struct
GenericArray
*
array
;
if
(
pcbDecoded
)
*
pcbDecoded
=
decoded
;
if
(
dwFlags
&
CRYPT_DECODE_ALLOC_FLAG
)
pvStructInfo
=
*
(
BYTE
**
)
pvStructInfo
;
array
=
(
struct
GenericArray
*
)
pvStructInfo
;
...
...
@@ -1157,6 +1157,8 @@ static BOOL CRYPT_AsnDecodeOidIgnoreTag(const BYTE *pbEncoded, DWORD cbEncoded,
}
}
}
if
(
pcbDecoded
)
*
pcbDecoded
=
1
+
lenBytes
+
dataLen
;
if
(
!
pvStructInfo
)
*
pcbStructInfo
=
bytesNeeded
;
else
if
(
*
pcbStructInfo
<
bytesNeeded
)
...
...
@@ -1198,8 +1200,6 @@ static BOOL CRYPT_AsnDecodeOidIgnoreTag(const BYTE *pbEncoded, DWORD cbEncoded,
else
*
(
LPSTR
*
)
pvStructInfo
=
NULL
;
*
pcbStructInfo
=
bytesNeeded
;
if
(
pcbDecoded
)
*
pcbDecoded
=
1
+
lenBytes
+
dataLen
;
}
}
return
ret
;
...
...
@@ -1837,6 +1837,8 @@ static BOOL CRYPT_AsnDecodeCopyBytesInternal(const BYTE *pbEncoded,
if
(
!
(
dwFlags
&
CRYPT_DECODE_NOCOPY_FLAG
))
bytesNeeded
+=
cbEncoded
;
if
(
pcbDecoded
)
*
pcbDecoded
=
cbEncoded
;
if
(
!
pvStructInfo
)
*
pcbStructInfo
=
bytesNeeded
;
else
if
(
*
pcbStructInfo
<
bytesNeeded
)
...
...
@@ -1858,8 +1860,6 @@ static BOOL CRYPT_AsnDecodeCopyBytesInternal(const BYTE *pbEncoded,
assert
(
blob
->
pbData
);
memcpy
(
blob
->
pbData
,
pbEncoded
,
blob
->
cbData
);
}
if
(
pcbDecoded
)
*
pcbDecoded
=
cbEncoded
;
}
return
ret
;
}
...
...
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