[ wxwindows-Patches-1542052 ] wxRegistry wrongly indexing array by
HKEY
SourceForge.net
noreply at sourceforge.net
Thu Aug 17 08:24:28 PDT 2006
Patches item #1542052, was opened at 2006-08-17 15:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1542052&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MSW specific
Group: bug fix
Status: Open
Resolution: None
Priority: 5
Submitted By: nusi (nusi)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxRegistry wrongly indexing array by HKEY
Initial Comment:
This code causes wxRegKey to access invalid memory:
wxString
sRegPath(wxT("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet"));
wxRegKey regKey(sRegPath); // crash within this constructor
The cause is that ExtractKeyName() returns a HKEY_*
value (like 0x80000000) which will than be used as
index to access the local array aStdKeys[].
ExtractKeyName() is supposed to return enum StdKeys.
This patch does exactly this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1542052&group_id=9863
More information about the wx-dev
mailing list