Paul Gofman : crypt32: Increase maximum object encode length.
Alexandre Julliard
julliard at winehq.org
Thu Jan 13 16:26:41 CST 2022
Module: wine
Branch: master
Commit: 861ae996833772ee0368b550fe12dc26f8531daa
URL: https://source.winehq.org/git/wine.git/?a=commit;h=861ae996833772ee0368b550fe12dc26f8531daa
Author: Paul Gofman <pgofman at codeweavers.com>
Date: Thu Jan 13 18:04:30 2022 +0300
crypt32: Increase maximum object encode length.
E. g., DigiCert CRL file is currently 35MB.
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/crypt32/decode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 6873cebeae4..d4a13a55a1b 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -47,7 +47,7 @@
#include "crypt32_private.h"
/* This is a bit arbitrary, but to set some limit: */
-#define MAX_ENCODED_LEN 0x02000000
+#define MAX_ENCODED_LEN 0x04000000
#define ASN_FLAGS_MASK 0xe0
#define ASN_TYPE_MASK 0x1f
@@ -6411,6 +6411,7 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
}
if (cbEncoded > MAX_ENCODED_LEN)
{
+ FIXME_(crypt)("Returning CRYPT_E_ASN1_LARGE, cbEncoded %u.\n", cbEncoded);
SetLastError(CRYPT_E_ASN1_LARGE);
return FALSE;
}
More information about the wine-cvs
mailing list