[PATCH] crypt32: Remove duplicate condition in CRYPT_AsnDecodeNameValueInternal().

Andrey Gusev andrey.goosev at gmail.com
Mon Feb 11 08:29:23 CST 2019


Signed-off-by: Andrey Gusev <andrey.goosev at 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:
                 {
-- 
2.20.1




More information about the wine-devel mailing list