From ee05e245a42a557a6deec5c66d24fefac4684acd Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 13 Apr 2006 11:44:52 +0200 Subject: [PATCH] crypt32: Avoid crash on NULL pointer in trace. --- dlls/crypt32/cert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 9269cb75138..f44cc637683 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -323,14 +323,14 @@ BOOL WINAPI CertGetEnhancedKeyUsage(PCCERT_CONTEXT pCertContext, DWORD dwFlags, DWORD bytesNeeded; BOOL ret = TRUE; - TRACE("(%p, %08lx, %p, %ld)\n", pCertContext, dwFlags, pUsage, *pcbUsage); - if (!pCertContext || !pcbUsage) { SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + TRACE("(%p, %08lx, %p, %ld)\n", pCertContext, dwFlags, pUsage, *pcbUsage); + if (!(dwFlags & CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG)) { DWORD propSize = 0;