crypt32(4/20): Check for and fail on indefinite-length encoding
Juan Lang
juan.lang at gmail.com
Mon Jul 23 20:27:22 CDT 2007
--Juan
-------------- next part --------------
From 3d7815a2675d55c2b1a81538e86f826aee35b9cd Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Mon, 23 Jul 2007 15:30:20 -0700
Subject: [PATCH] Check for and fail on indefinite-length encoding
---
dlls/crypt32/decode.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 29687ef..8a062ce 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -193,6 +193,12 @@ static BOOL WINAPI CRYPT_GetLen(const BY
ret = TRUE;
}
}
+ else if (pbEncoded[1] == 0x80)
+ {
+ FIXME("unimplemented for indefinite-length encoding\n");
+ SetLastError(CRYPT_E_ASN1_CORRUPT);
+ ret = FALSE;
+ }
else
{
BYTE lenLen = GET_LEN_BYTES(pbEncoded[1]);
--
1.4.1
More information about the wine-patches
mailing list