From c2e1cbdff3acb689a819f8fdc903d158b4821d02 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 30 Jan 2011 16:43:08 +0000 Subject: [PATCH] [ROSSYM] - Properly handle images without debug symbols. svn path=/branches/cmake-bringup/; revision=50571 --- lib/rossym/fromfile.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/rossym/fromfile.c b/lib/rossym/fromfile.c index a1300f40722..00884a5a56b 100644 --- a/lib/rossym/fromfile.c +++ b/lib/rossym/fromfile.c @@ -67,6 +67,13 @@ RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo) SymbolTable = NtHeaders.FileHeader.PointerToSymbolTable; NumSymbols = NtHeaders.FileHeader.NumberOfSymbols; + + if (!NumSymbols) + { + DPRINT1("Image doesn't have debug symbols\n"); + return FALSE; + } + DPRINT("SymbolTable %x NumSymbols %x\n", SymbolTable, NumSymbols); /* Load section headers */