Stefan Leichter : dbghelp: Add a null check for optional output parameter for function SymFromAddr.

Alexandre Julliard julliard at winehq.org
Mon Dec 2 13:37:51 CST 2013


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

Author: Stefan Leichter <Stefan.Leichter at camline.com>
Date:   Sun Dec  1 22:07:20 2013 +0100

dbghelp: Add a null check for optional output parameter for function SymFromAddr.

---

 dlls/dbghelp/symbol.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index e6401a9..8c482c7 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -1229,7 +1229,8 @@ BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address,
     if ((sym = symt_find_nearest(pair.effective, Address)) == NULL) return FALSE;
 
     symt_fill_sym_info(&pair, NULL, &sym->symt, Symbol);
-    *Displacement = Address - Symbol->Address;
+    if (Displacement)
+        *Displacement = Address - Symbol->Address;
     return TRUE;
 }
 




More information about the wine-cvs mailing list