cryptui: Fix a crash with certification path (resend)
André Hentschel
nerv at dawncrow.de
Wed Oct 6 10:23:01 CDT 2010
see Juan Lang's comment on it.
---
dlls/cryptui/main.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index a95a7a4..d92fbdd 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -4041,9 +4041,8 @@ static void show_cert_chain(HWND hwnd, struct hierarchy_data *data)
tvis.u.item.pszText = name;
tvis.u.item.state = TVIS_EXPANDED;
tvis.u.item.stateMask = TVIS_EXPANDED;
- if (i == 1 &&
- (provSigner->pChainContext->TrustStatus.dwErrorStatus &
- CERT_TRUST_IS_PARTIAL_CHAIN))
+ if (i == 1 && provSigner->pChainContext &&
+ (provSigner->pChainContext->TrustStatus.dwErrorStatus & CERT_TRUST_IS_PARTIAL_CHAIN))
{
/* The root of the chain has a special case: if the chain is
* a partial chain, the icon is a warning icon rather than an
@@ -4051,8 +4050,8 @@ static void show_cert_chain(HWND hwnd, struct hierarchy_data *data)
*/
tvis.u.item.iImage = 2;
}
- else if (provSigner->pasCertChain[i - 1].pChainElement->TrustStatus.
- dwErrorStatus == 0)
+ else if (i > 1 &&
+ provSigner->pasCertChain[i - 1].pChainElement->TrustStatus.dwErrorStatus == 0)
tvis.u.item.iImage = 0;
else
tvis.u.item.iImage = 1;
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list