mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 12:08:55 +00:00
[MSCONFIG]
- fix CID 503793 (unlikely NULL pointer dereference), 514558 (check return value) svn path=/trunk/; revision=64884
This commit is contained in:
parent
27938d24c5
commit
a48fe43631
2 changed files with 12 additions and 11 deletions
|
@ -187,19 +187,16 @@ GetServices ( void )
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (pServiceFailureActions->cActions)
|
||||
{
|
||||
if (pServiceFailureActions->lpsaActions[0].Type == SC_ACTION_REBOOT)
|
||||
{
|
||||
LoadString(hInst, IDS_SERVICES_YES, szStatus, 128);
|
||||
item.pszText = szStatus;
|
||||
item.iSubItem = 1;
|
||||
SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
|
||||
}
|
||||
}
|
||||
|
||||
if (pServiceFailureActions != NULL)
|
||||
{
|
||||
if (pServiceFailureActions->cActions && pServiceFailureActions->lpsaActions[0].Type == SC_ACTION_REBOOT)
|
||||
{
|
||||
LoadString(hInst, IDS_SERVICES_YES, szStatus, 128);
|
||||
item.pszText = szStatus;
|
||||
item.iSubItem = 1;
|
||||
SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, pServiceFailureActions);
|
||||
pServiceFailureActions = NULL;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,11 @@ GetDisabledAutostartEntriesFromRegistry (TCHAR * szBasePath)
|
|||
if (Data == NULL)
|
||||
break;
|
||||
|
||||
RegEnumKeyEx(hKey, Index, szValueName, &dwValueLength, NULL, NULL, NULL, NULL);
|
||||
if(RegEnumKeyEx(hKey, Index, szValueName, &dwValueLength, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, Data);
|
||||
continue;
|
||||
}
|
||||
_stprintf(szSubPath, _T("%s\\%s"), szBasePath, szValueName);
|
||||
memset(&item, 0, sizeof(LV_ITEM));
|
||||
item.mask = LVIF_TEXT;
|
||||
|
|
Loading…
Reference in a new issue