empty-cell-name-fix-20040313
authorJeffrey Altman <jaltman@mit.edu>
Sat, 13 Mar 2004 21:00:52 +0000 (21:00 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 13 Mar 2004 21:00:52 +0000 (21:00 +0000)
If the Registry contains a "Cell" entry which is the null string
don't crash. Instead panic and log an appropriate error.

src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/cm_config.c

index c1be190..3e949be 100644 (file)
@@ -911,7 +911,7 @@ LONG __stdcall afsd_ExceptionFilter(EXCEPTION_POINTERS *ep)
           
     if (ep->ExceptionRecord->ExceptionCode == EXCEPTION_BREAKPOINT)
     {
-        afsi_log("\nEXCEPTION_BREAKPOINT - continue execition ...\n");
+        afsi_log("\nEXCEPTION_BREAKPOINT - continue execution ...\n");
     
 #ifdef _DEBUG
         if (allocRequestBrk)
index 60105fc..6063b00 100644 (file)
@@ -489,7 +489,7 @@ long cm_GetRootCellName(char *cellNamep)
        code = RegQueryValueEx(parmKey, "Cell", NULL, NULL,
                                cellNamep, &dummyLen);
        RegCloseKey (parmKey);
-       if (code != ERROR_SUCCESS)
+       if (code != ERROR_SUCCESS || cellNamep[0] == 0)
                return -1;
 
        return 0;