From 7c83565580baea7e77cce478971f5c8d9f5fbe12 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Mon, 8 Sep 2008 12:43:15 -0700 Subject: [PATCH] crypt32: Don't store redundant copy of detached hash message data. --- dlls/crypt32/msg.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 1c07e05cd1f..54c5bb0fdd4 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); }