Hugh McMaster : regedit: Replace a HeapAlloc() HEAP_ZERO_MEMORY call in framewnd.c.
Module: wine Branch: master Commit: fc5bd1b4389ce7804677d67aef10d36f5604b0b6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc5bd1b4389ce7804677d67aef... Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Wed Aug 2 12:35:51 2017 +0000 regedit: Replace a HeapAlloc() HEAP_ZERO_MEMORY call in framewnd.c. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/regedit/framewnd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index b82eb10..cb7738c 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -367,7 +367,10 @@ static void ExportRegistryFile_StoreSelection(HWND hdlg, OPENFILENAMEW *pOpenFil SendDlgItemMessageW(hdlg, IDC_EXPORT_PATH, WM_GETTEXT, len+1, pOpenFileName->lCustData); } else - pOpenFileName->lCustData = (LPARAM)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR)); + { + pOpenFileName->lCustData = (LPARAM)heap_xalloc(sizeof(WCHAR)); + *(WCHAR *)pOpenFileName->lCustData = 0; + } } static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
participants (1)
-
Alexandre Julliard