Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/crypt32/decode.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c index d886abb503..27f48707b2 100644 --- a/dlls/crypt32/decode.c +++ b/dlls/crypt32/decode.c @@ -1588,15 +1588,12 @@ static BOOL CRYPT_AsnDecodeNameValueInternal(const BYTE *pbEncoded, case ASN_VISIBLESTRING: case ASN_GENERALSTRING: value->Value.cbData = dataLen; - if (dataLen) - { - if (!(dwFlags & CRYPT_DECODE_NOCOPY_FLAG)) - memcpy(value->Value.pbData, - pbEncoded + 1 + lenBytes, dataLen); - else - value->Value.pbData = (LPBYTE)pbEncoded + 1 + - lenBytes; - } + if (!(dwFlags & CRYPT_DECODE_NOCOPY_FLAG)) + memcpy(value->Value.pbData, + pbEncoded + 1 + lenBytes, dataLen); + else + value->Value.pbData = (LPBYTE)pbEncoded + 1 + + lenBytes; break; case ASN_BMPSTRING: {