Mikko Rasa : crypt32: Only clear *pcbDecoded on error in CryptVerifyMessageSignature.

Alexandre Julliard julliard at winehq.org
Thu Aug 19 11:44:05 CDT 2010


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

Author: Mikko Rasa <tdb at tdb.fi>
Date:   Wed Aug 18 22:32:41 2010 +0300

crypt32: Only clear *pcbDecoded on error in CryptVerifyMessageSignature.

---

 dlls/crypt32/message.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/crypt32/message.c b/dlls/crypt32/message.c
index 7551cce..779959a 100644
--- a/dlls/crypt32/message.c
+++ b/dlls/crypt32/message.c
@@ -194,13 +194,13 @@ BOOL WINAPI CryptVerifyMessageSignature(PCRYPT_VERIFY_MESSAGE_PARA pVerifyPara,
 
     if (ppSignerCert)
         *ppSignerCert = NULL;
-    if (pcbDecoded)
-        *pcbDecoded = 0;
     if (!pVerifyPara ||
      pVerifyPara->cbSize != sizeof(CRYPT_VERIFY_MESSAGE_PARA) ||
      GET_CMSG_ENCODING_TYPE(pVerifyPara->dwMsgAndCertEncodingType) !=
      PKCS_7_ASN_ENCODING)
     {
+        if(pcbDecoded)
+            *pcbDecoded = 0;
         SetLastError(E_INVALIDARG);
         return FALSE;
     }
@@ -246,6 +246,8 @@ BOOL WINAPI CryptVerifyMessageSignature(PCRYPT_VERIFY_MESSAGE_PARA pVerifyPara,
         }
         CryptMsgClose(msg);
     }
+    if(!ret && pcbDecoded)
+        *pcbDecoded = 0;
     TRACE("returning %d\n", ret);
     return ret;
 }




More information about the wine-cvs mailing list