This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push: new d6823eb [NETBEANS-2523] Installer creates invalid Win Registry value new 07d4ace Merge pull request #1844 from lbruun/NETBEANS-2523-invalid-winregistry-entry d6823eb is described below commit d6823eb3a36ee2b15f6c70c1fb03a0d06d0155c9 Author: Lars Bruun-Hansen <lbr...@apache.org> AuthorDate: Sat Jan 4 22:35:05 2020 +0100 [NETBEANS-2523] Installer creates invalid Win Registry value The WindowsRegistry_set32BitValue0() function was incorrectly using the length of the Registry name (e.g. 'NoModify') as the the length of value. Since the value we are setting is of type DWORD the length is indeed always exactly 4 bytes, regardless of OS bitness. Solution: sizeof(dword) will always return 4, but we might as well have hard-coded the 4. --- nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c b/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c index 524a166..3608bf0 100644 --- a/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c +++ b/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c @@ -430,7 +430,7 @@ JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsR DWORD dword = (DWORD) jValue; LPBYTE byteValue = (LPBYTE) &dword; - if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_DWORD, byteValue, sizeof(name), 0)) { + if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_DWORD, byteValue, sizeof(dword), 0)) { throwException(jEnv, "Cannot set value"); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists