Juan Lang : crypt32: Don' t keep a pointer to the lower quality chains when choosing a higher quality one , otherwise they'll get double-freed.

Alexandre Julliard julliard at winehq.org
Fri Oct 19 08:35:47 CDT 2007


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Oct 18 20:44:18 2007 -0700

crypt32: Don't keep a pointer to the lower quality chains when choosing a higher quality one, otherwise they'll get double-freed.

---

 dlls/crypt32/chain.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index ff555bb..9832f0e 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -1272,6 +1272,8 @@ static PCertificateChain CRYPT_ChooseHighestQualityChain(
              chain->context.rgpLowerQualityChainContext;
             alternate->context.rgpLowerQualityChainContext[i] =
              (PCCERT_CHAIN_CONTEXT)chain;
+            chain->context.cLowerQualityChainContext = 0;
+            chain->context.rgpLowerQualityChainContext = NULL;
             chain = alternate;
         }
     }




More information about the wine-cvs mailing list