https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d7d3314b337d6ab5589a66c4c69a563dd8b2c78

commit 9d7d3314b337d6ab5589a66c4c69a563dd8b2c78
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Tue Apr 25 18:04:36 2023 +0900
Commit:     GitHub <[email protected]>
CommitDate: Tue Apr 25 18:04:36 2023 +0900

    [REGEDIT] Check whether pszSelectKey is NULL on CDN_FILEOK (#5255)
    
    Avoid crash on exporting root. Add NULL check of pszSelectKey on CDN_FILEOK 
handling. CORE-18938
---
 base/applications/regedit/framewnd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/applications/regedit/framewnd.c 
b/base/applications/regedit/framewnd.c
index f886e0c7730..852d38feb02 100644
--- a/base/applications/regedit/framewnd.c
+++ b/base/applications/regedit/framewnd.c
@@ -567,7 +567,7 @@ static UINT_PTR CALLBACK 
ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, W
             {
                 GetWindowTextW(hwndExportBranchText, pszSelectedKey, 
_MAX_PATH);
             }
-            else
+            else if (pszSelectedKey)
             {
                 pszSelectedKey[0] = L'\0';
             }

Reply via email to