Module: wine Branch: master Commit: 29e58e30f14cbb6aadb1b99851718f36b014916d URL: http://source.winehq.org/git/wine.git/?a=commit;h=29e58e30f14cbb6aadb1b99851...
Author: Tillmann Werner tillmann.werner@gmx.de Date: Tue Jan 5 22:20:44 2010 +0100
winedump: Fix null pointer dereference in spec mode.
---
tools/winedump/pe.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index a2c2f0a..d00d2ea 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -1631,11 +1631,9 @@ int dll_open (const char *dll_name) */ int dll_next_symbol (parsed_symbol * sym) { - if (!dll_current_symbol->symbol) - return 1; - - assert (dll_symbols); - + if (!dll_current_symbol || !dll_current_symbol->symbol) + return 1; + assert (dll_symbols); sym->symbol = strdup (dll_current_symbol->symbol); sym->ordinal = dll_current_symbol->ordinal; dll_current_symbol++;