From 275f6ca3df976628152a637f8b9d32e3908dedc9 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 6 Feb 2020 14:00:20 +0100 Subject: [PATCH] crypt32: Allow only ASCII digits in CRYPT_AsnEncodeNumericString. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/crypt32/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c index 45eeea8e9df..91735eb53df 100644 --- a/dlls/crypt32/encode.c +++ b/dlls/crypt32/encode.c @@ -2060,7 +2060,7 @@ static BOOL CRYPT_AsnEncodeNumericString(const CERT_NAME_VALUE *value, ptr += lenBytes; for (i = 0; ret && i < encodedLen; i++) { - if (isdigitW(str[i])) + if ('0' <= str[i] && str[i] <= '9') *ptr++ = (BYTE)str[i]; else {