File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
contrib/platform/src/com/sun/jna/platform/win32 Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Features
1111
1212Bug Fixes
1313---------
14+ * [ #1644 ] ( https://github.com/java-native-access/jna/issues/1644 ) : Fix bug in VARDESC causing an illegal memory access - [ @stmuecke ] ( https://github.com/stmuecke )
1415
1516Release 5.15.0
1617==============
Original file line number Diff line number Diff line change @@ -1398,14 +1398,10 @@ public static class ByReference extends _VARDESC implements
13981398 public VARIANT .ByReference lpvarValue ;
13991399
14001400 public _VARDESC () {
1401- setType ("lpvarValue" );
1402- this .read ();
14031401 }
14041402
14051403 public _VARDESC (Pointer pointer ) {
14061404 super (pointer );
1407- setType ("lpvarValue" );
1408- this .read ();
14091405 }
14101406
14111407 /**
@@ -1431,9 +1427,15 @@ public VARDESC() {
14311427
14321428 public VARDESC (Pointer pointer ) {
14331429 super (pointer );
1434- this ._vardesc .setType ("lpvarValue" );
14351430 this .read ();
14361431 }
1432+
1433+ @ Override
1434+ public void read () {
1435+ readField ("varkind" );
1436+ this ._vardesc .setType (varkind .value == VARKIND .VAR_CONST ? "lpvarValue" : "oInst" );
1437+ super .read ();
1438+ }
14371439 }
14381440
14391441 @ FieldOrder ({"tdesc" , "_elemdesc" })
You can’t perform that action at this time.
0 commit comments