[PATCH] rpcrt4: Fixed incorrect NULL check condition (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Oct 17 09:42:27 CDT 2009
Hi,
Coverity spotted that this could lead to NULL dereference,
and yes, the && should be ||.
Ciao, Marcus
---
dlls/rpcrt4/rpc_assoc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/rpc_assoc.c b/dlls/rpcrt4/rpc_assoc.c
index 117301f..a217091 100644
--- a/dlls/rpcrt4/rpc_assoc.c
+++ b/dlls/rpcrt4/rpc_assoc.c
@@ -97,7 +97,7 @@ RPC_STATUS RPCRT4_GetAssociation(LPCSTR Protseq, LPCSTR NetworkAddr,
if (!strcmp(Protseq, assoc->Protseq) &&
!strcmp(NetworkAddr, assoc->NetworkAddr) &&
!strcmp(Endpoint, assoc->Endpoint) &&
- ((!assoc->NetworkOptions && !NetworkOptions) || !strcmpW(NetworkOptions, assoc->NetworkOptions)))
+ (!assoc->NetworkOptions || !NetworkOptions || !strcmpW(NetworkOptions, assoc->NetworkOptions)))
{
assoc->refs++;
*assoc_out = assoc;
--
1.5.6
More information about the wine-patches
mailing list