Juan Lang : crypt32: Don' t check for the TLV after indefinite-length sequence items, the item' s decoder has already done so.
Alexandre Julliard
julliard at winehq.org
Sat Dec 20 06:35:00 CST 2008
Module: wine
Branch: master
Commit: fa65c3f6342ccbeef0715244bd16b2ca7fa54c23
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa65c3f6342ccbeef0715244bd16b2ca7fa54c23
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri Dec 19 15:37:35 2008 -0800
crypt32: Don't check for the TLV after indefinite-length sequence items, the item's decoder has already done so.
---
dlls/crypt32/decode.c | 24 ++++--------------------
1 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 632369f..fa06510 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -376,26 +376,10 @@ static BOOL CRYPT_AsnDecodeSequenceItems(struct AsnDecodeSequenceItem items[],
}
else
{
- if (itemLen == CMSG_INDEFINITE_LENGTH)
- {
- if (itemDecoded > itemEncodedLen - 2 ||
- *(ptr + itemDecoded) != 0 ||
- *(ptr + itemDecoded + 1) != 0)
- {
- TRACE("expected 0 TLV\n");
- SetLastError(CRYPT_E_ASN1_CORRUPT);
- ret = FALSE;
- }
- else
- itemDecoded += 2;
- }
- if (ret)
- {
- ptr += itemDecoded;
- decoded += itemDecoded;
- TRACE("item %d: decoded %d bytes\n", i,
- itemDecoded);
- }
+ ptr += itemDecoded;
+ decoded += itemDecoded;
+ TRACE("item %d: decoded %d bytes\n", i,
+ itemDecoded);
}
}
else if (items[i].optional &&
More information about the wine-cvs
mailing list