[PATCH] winedbg: check for buffer being NULL

Marcus Meissner marcus at jet.franken.de
Sat Jan 31 12:53:19 CST 2009


Hi,

CID 490, one additional check for buffer being NULL,
it is checked everywhere else too.

Ciao, Marcus
---
 programs/winedbg/symbol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/winedbg/symbol.c b/programs/winedbg/symbol.c
index c4b09a3..03efac1 100644
--- a/programs/winedbg/symbol.c
+++ b/programs/winedbg/symbol.c
@@ -102,7 +102,7 @@ static BOOL fill_sym_lvalue(const SYMBOL_INFO* sym, ULONG base,
          */
         if (!types_get_info(&type, TI_GET_VALUE, &v) || (v.n1.n2.vt & VT_BYREF))
         {
-            snprintf(buffer, sz, "Couldn't dereference pointer for const value");
+            if (buffer) snprintf(buffer, sz, "Couldn't dereference pointer for const value");
             return FALSE;
         }
         pdw = (DWORD*)lexeme_alloc_size(sizeof(*pdw));
-- 
1.5.6



More information about the wine-patches mailing list