Juan Lang : crypt32: Don' t store redundant copy of detached hash message data.

Alexandre Julliard julliard at winehq.org
Tue Sep 9 05:50:36 CDT 2008


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Mon Sep  8 12:43:15 2008 -0700

crypt32: Don't store redundant copy of detached hash message data.

---

 dlls/crypt32/msg.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index 1c07e05..54c5bb0 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -1723,15 +1723,13 @@ static BOOL CDecodeMsg_FinalizeHashedContent(CDecodeMsg *msg,
         {
             /* Unlike for non-detached messages, the data were never stored as
              * the content param, but were saved in msg->detached_data instead.
-             * Set the content property with the detached data so the data may
-             * be hashed.
              */
-            ContextPropertyList_SetProperty(msg->properties,
-             CMSG_CONTENT_PARAM, msg->detached_data.pbData,
-             msg->detached_data.cbData);
+            content.pbData = msg->detached_data.pbData;
+            content.cbData = msg->detached_data.cbData;
         }
-        ret = ContextPropertyList_FindProperty(msg->properties,
-         CMSG_CONTENT_PARAM, &content);
+        else
+            ret = ContextPropertyList_FindProperty(msg->properties,
+             CMSG_CONTENT_PARAM, &content);
         if (ret)
             ret = CryptHashData(msg->u.hash, content.pbData, content.cbData, 0);
     }




More information about the wine-cvs mailing list