[0.4.7][SYSSETUP] Fix a DPH report about dwPageCount CORE-18068

- "(sdk/lib/rtl/heappage.c:1329) corrupted suffix pattern"
  detected at
  "dll/win32/syssetup/wizard.c:2672 (InstallWizard)"
- Add an ASSERT(), as hinted by Mark Jansen.

It happened in 2nd stage setup after the Gecko setup was canceled or completed and the button "Fertig" (its german label) was pressed.
It had no user visible impact. I never saw a crash due to that, but we should still not corrupt memory.
It regressed the last time a page within that setup was added without increasing the array in
SVN r75495 == git fc1f0c2088

fix picked from commit 0.4.10-dev-224-g 1668527acf
This commit is contained in:
Joachim Henze 2022-03-04 14:40:05 +01:00
parent d23c219409
commit e061407748

View file

@ -2522,7 +2522,7 @@ InstallWizard(VOID)
PSETUPDATA pSetupData = NULL;
HMODULE hNetShell = NULL;
PFNREQUESTWIZARDPAGES pfn = NULL;
DWORD dwPageCount = 8, dwNetworkPageCount = 0;
DWORD dwPageCount = 9, dwNetworkPageCount = 0;
BOOL bActCtxActivated;
ULONG_PTR cookie;
HANDLE hActCtx;
@ -2663,6 +2663,8 @@ InstallWizard(VOID)
psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
phpage[nPages++] = CreatePropertySheetPage(&psp);
ASSERT(nPages == dwPageCount);
/* Create the property sheet */
psh.dwSize = sizeof(PROPSHEETHEADER);
psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER | PSH_MODELESS;