regedit: disallow editing root key names
Daniel Jelinski
djelinski1 at gmail.com
Tue Oct 16 13:34:17 CDT 2012
-------------- next part --------------
From 516cdbe1f4bfb5f99b8eb09c7085fbbfe1ba433a Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Tue, 16 Oct 2012 20:14:52 +0200
Subject: regedit: disallow editing root key names
Fixes bug 31953
---
programs/regedit/childwnd.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c
index 1ff7a90..6dc7d0c 100644
--- a/programs/regedit/childwnd.c
+++ b/programs/regedit/childwnd.c
@@ -405,6 +405,12 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
TPM_RIGHTBUTTON, pt.x, pt.y, 0, hFrameWnd, NULL);
break;
}
+ case TVN_BEGINLABELEDITW: {
+ HKEY hRootKey;
+ LPWSTR path = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey);
+ if (!path || !*path) return 1;
+ return 0;
+ }
case TVN_ENDLABELEDITW: {
HKEY hRootKey;
LPNMTVDISPINFOW dispInfo = (LPNMTVDISPINFOW)lParam;
--
1.7.5.4
More information about the wine-patches
mailing list