https://issues.apache.org/bugzilla/show_bug.cgi?id=49851
Summary: JNI Registry.deleteKey and Registry.deleteValue
corrupt Windows registry
Product: Tomcat Native
Version: 1.1.20
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P2
Component: Library
AssignedTo: [email protected]
ReportedBy: [email protected]
The issue was discovered in version 1.1.20 of Tomcat Native libraries while
trying to use Registry class on Windows XP.
Unlike other methods, deleteKey() and deleteValue() do not initialize
parameters that are passed to Windows APIs.
Typical initialization of string parameters consists of
TCN_ALLOC_WSTRING(name);
...
TCN_INIT_WSTRING(name);
...
TCN_FREE_WSTRING(name);
However, the two methods listed above do not call TCN_INIT_WSTRING. Without
this, the Windows API SHDeleteKeyW() is called with a null (0) parameter that
causes Windows registry corruption. In my case (before issue was diagnosed) it
resulted in the need to re-install Windows (twice) :-(.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]