Alexandre Julliard : crypt32: List allowed characters instead of relying on wctype properties.

Alexandre Julliard julliard at winehq.org
Mon Nov 9 15:11:51 CST 2020


Module: wine
Branch: master
Commit: d202e02f792901038888c35efaaaa147a7413dea
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d202e02f792901038888c35efaaaa147a7413dea

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov  9 11:44:20 2020 +0100

crypt32: List allowed characters instead of relying on wctype properties.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/crypt32/encode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c
index 2e3f976bded..46f4b8f25e7 100644
--- a/dlls/crypt32/encode.c
+++ b/dlls/crypt32/encode.c
@@ -2074,9 +2074,7 @@ static BOOL CRYPT_AsnEncodeNumericString(const CERT_NAME_VALUE *value,
 
 static inline BOOL isprintableW(WCHAR wc)
 {
-    return iswalnum(wc) || iswspace(wc) || wc == '\'' || wc == '(' ||
-     wc == ')' || wc == '+' || wc == ',' || wc == '-' || wc == '.' ||
-     wc == '/' || wc == ':' || wc == '=' || wc == '?';
+    return wc && wcschr( L"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 '()+,-./:=?", wc );
 }
 
 static BOOL CRYPT_AsnEncodePrintableString(const CERT_NAME_VALUE *value,




More information about the wine-cvs mailing list