Juan Lang : crypt32: Check length of sequence before checking tag.
Alexandre Julliard
julliard at winehq.org
Tue Sep 9 05:50:36 CDT 2008
Module: wine
Branch: master
Commit: 254f9b9c01d9aee3c475843ea0357b5b90de9e8c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=254f9b9c01d9aee3c475843ea0357b5b90de9e8c
Author: Juan Lang <juan.lang at gmail.com>
Date: Mon Sep 8 12:30:01 2008 -0700
crypt32: Check length of sequence before checking tag.
---
dlls/crypt32/decode.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index eb782d3..0d46fe3 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -475,6 +475,11 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[],
cbEncoded, dwFlags, pDecodePara, pvStructInfo, *pcbStructInfo,
startingPointer);
+ if (!cbEncoded)
+ {
+ SetLastError(CRYPT_E_ASN1_EOD);
+ return FALSE;
+ }
if (pbEncoded[0] == ASN_SEQUENCE)
{
DWORD dataLen;
More information about the wine-cvs
mailing list