empty-cell-name-fix-20040313

If the Registry contains a "Cell" entry which is the null string
don't crash. Instead panic and log an appropriate error.
This commit is contained in:
Jeffrey Altman 2004-03-13 21:00:52 +00:00 committed by Jeffrey Altman
parent facb3c0102
commit 9b8b47a3d2
2 changed files with 2 additions and 2 deletions

View 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)

View 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;