-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KEY_ALL_ACCESS value is incorrect in WinNT.java #1128
Comments
@trevormaggs Please let us know when you have made a pull request for this. |
@dblock. has the bug been fixed? Where is it? |
@trevormaggs I think @dblock meant, that you already have the solution, so you could turn that into a PR and propose that for inclusion. |
Please refer to Issue java-native-access#1128 (KEY_ALL_ACCESS value is incorrect in WinNT.java) for details. There is an explanation why it needs to be fixed. In short, The KEY_ALL_ACCESS variable has missing parentheses, which gives an incorrect ORed value. It should match with the original winnt.h C header file in Win32.
@matthiasblaesing, thanks for your clarification. @dblock, as requested, please refer to #1129 PR for changes in the code with the proposed bug fix. |
Fix was merged to master. |
Version of JNA and related jars
JNA version 5.4.0 - jna-5.4.0.jar and jna-platform-5.4.0.jar
Version and vendor of the java virtual machine
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
Operating system
Windows 10
System architecture (CPU type, bitness of the JVM)
Xeon X3430 @ 2,40GHz and 64 bit JVM
Complete description of the problem
A bug exists in Line 922 of the WinNT.java source code.
The bitmask value given by the above combination is incorrect due to the missing parentheses. It should match with the original winnt.h C header file in Win32.
The bug in Java gives an incorrect hex value of 0x1f003f, which should be 0xf003f as confirmed by the C header.
Steps to reproduce
To fix, just add the missing parentheses to exactly match with winnt.h.
Let me know once the bug fix is resolved and updated in GitHub. Thanks.
Trevor
The text was updated successfully, but these errors were encountered: