Only copy the dwSize bytes really occupied by lpPropSheetPage.

This commit is contained in:
François Gouget 2001-01-10 22:42:58 +00:00 committed by Alexandre Julliard
parent 8582b28749
commit 16baace694
1 changed files with 1 additions and 1 deletions

View File

@ -1966,7 +1966,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
{ {
PROPSHEETPAGEA* ppsp = COMCTL32_Alloc(sizeof(PROPSHEETPAGEA)); PROPSHEETPAGEA* ppsp = COMCTL32_Alloc(sizeof(PROPSHEETPAGEA));
*ppsp = *lpPropSheetPage; memcpy(ppsp,lpPropSheetPage,min(lpPropSheetPage->dwSize,sizeof(PROPSHEETPAGEA)));
if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) && HIWORD( ppsp->u.pszTemplate ) ) if ( !(ppsp->dwFlags & PSP_DLGINDIRECT) && HIWORD( ppsp->u.pszTemplate ) )
ppsp->u.pszTemplate = HEAP_strdupA( GetProcessHeap(), 0, lpPropSheetPage->u.pszTemplate ); ppsp->u.pszTemplate = HEAP_strdupA( GetProcessHeap(), 0, lpPropSheetPage->u.pszTemplate );