Andrey Gusev : crypt32: Remove duplicate condition in CRYPT_AsnDecodeNameValueInternal().
Alexandre Julliard
julliard at winehq.org
Mon Feb 11 16:12:12 CST 2019
Module: wine
Branch: master
Commit: 15b7112d07dc4f13c90c03c3f1e6776e7727148a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=15b7112d07dc4f13c90c03c3f1e6776e7727148a
Author: Andrey Gusev <andrey.goosev at gmail.com>
Date: Mon Feb 11 16:29:23 2019 +0200
crypt32: Remove duplicate condition in CRYPT_AsnDecodeNameValueInternal().
Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 d886abb..27f4870 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:
{
More information about the wine-cvs
mailing list