ole32: Avoid potential NULL pointer dereferences in a TRACE.

Michael Stefaniuc mstefani at redhat.de
Tue May 25 18:27:58 CDT 2010


Both fmt and med args are potential candidates.
Found by coccicheck.
---
 dlls/ole32/clipboard.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 2afc77e..3064bb0 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -1266,10 +1266,10 @@ static HRESULT WINAPI snapshot_GetDataHere(IDataObject *iface, FORMATETC *fmt,
     ole_priv_data_entry *entry;
     TYMED supported;
 
-    TRACE("(%p, %p {%s}, %p (tymed %x)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
-
     if ( !fmt || !med ) return E_INVALIDARG;
 
+    TRACE("(%p, %p {%s}, %p (tymed %x)\n", iface, fmt, dump_fmtetc(fmt), med, med->tymed);
+
     if ( !OpenClipboard(NULL)) return CLIPBRD_E_CANT_OPEN;
 
     if(!This->data)
-- 
1.7.1



More information about the wine-patches mailing list