Fixed rsym for executables without any debug informations.
Modified: trunk/reactos/tools/rsym.c

Modified: trunk/reactos/tools/rsym.c
--- trunk/reactos/tools/rsym.c	2005-05-17 19:16:21 UTC (rev 15386)
+++ trunk/reactos/tools/rsym.c	2005-05-17 20:28:57 UTC (rev 15387)
@@ -368,7 +368,8 @@
           CoffIndex++;
         }
       NewStabFunctionStringOffset = (*MergedSymbols)[*MergedSymbolCount].FunctionOffset;
-      if (CoffSymbols[CoffIndex].Address < (*MergedSymbols)[*MergedSymbolCount].Address
+      if (CoffSymbolsCount > 0 &&
+          CoffSymbols[CoffIndex].Address < (*MergedSymbols)[*MergedSymbolCount].Address
           && StabFunctionStartAddress < CoffSymbols[CoffIndex].Address
           && 0 != CoffSymbols[CoffIndex].FunctionOffset)
         {
@@ -799,6 +800,13 @@
       exit(1);
     }
 
+  if (StabsLength == 0 || StabStringsLength == 0)
+    {
+      /* no symbol info */
+      free(FileData);
+      return 0;
+    }
+
   if (GetCoffInfo(FileData, PEFileHeader, PESectionHeaders, &CoffsLength, &CoffBase,
                   &CoffStringsLength, &CoffStringBase))
     {