Module: wine Branch: master Commit: 9686e7b2868b317c0ffab9916fb4ea9f47b61a8f URL: http://source.winehq.org/git/wine.git/?a=commit;h=9686e7b2868b317c0ffab9916f...
Author: Juan Lang juan.lang@gmail.com Date: Mon Oct 20 14:02:39 2008 -0700
crypt32: Don't crash if adding to a provider store fails.
---
dlls/crypt32/provstore.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/crypt32/provstore.c b/dlls/crypt32/provstore.c index fba11eb..70dba64 100644 --- a/dlls/crypt32/provstore.c +++ b/dlls/crypt32/provstore.c @@ -78,7 +78,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert, /* dirty trick: replace the returned context's hCertStore with * store. */ - if (ppStoreContext) + if (ret && ppStoreContext) (*(PCERT_CONTEXT *)ppStoreContext)->hCertStore = store; return ret; } @@ -145,7 +145,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl, /* dirty trick: replace the returned context's hCertStore with * store. */ - if (ppStoreContext) + if (ret && ppStoreContext) (*(PCRL_CONTEXT *)ppStoreContext)->hCertStore = store; return ret; } @@ -212,7 +212,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl, /* dirty trick: replace the returned context's hCertStore with * store. */ - if (ppStoreContext) + if (ret && ppStoreContext) (*(PCTL_CONTEXT *)ppStoreContext)->hCertStore = store; return ret; }