Alessandro Pignotti : dplayx: Check for null pointer dereference in DP_FindPlayer.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Mar 21 17:02:48 CDT 2007


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

Author: Alessandro Pignotti <alex.pigna at inventati.org>
Date:   Wed Mar 21 12:14:47 2007 +0100

dplayx: Check for null pointer dereference in DP_FindPlayer.

---

 dlls/dplayx/dplay.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 9889283..ed58ddf 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -1280,6 +1280,9 @@ static lpPlayerList DP_FindPlayer( IDirectPlay2AImpl* This, DPID dpid )
 
   TRACE( "(%p)->(0x%08x)\n", This, dpid );
 
+  if(This->dp2->lpSysGroup == NULL)
+    return NULL;
+
   DPQ_FIND_ENTRY( This->dp2->lpSysGroup->players, players, lpPData->dpid, ==, dpid, lpPlayers );
 
   return lpPlayers;




More information about the wine-cvs mailing list