Fix potential security exploit in generated Java classes

This commit is contained in:
William S Fulton 2015-08-01 08:01:06 +01:00
commit a1771cb8a0
7 changed files with 42 additions and 27 deletions

View file

@ -31,8 +31,8 @@ import java.lang.*; // for Exception
// Create a new getCPtr() function which takes Java null and is public
%typemap(javabody) NS::Greeting %{
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
@ -46,8 +46,8 @@ import java.lang.*; // for Exception
// Make the pointer constructor public
%typemap(javabody) NS::Farewell %{
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
public $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;

View file

@ -39,7 +39,7 @@ import java.lang.*; // for Exception
// Create a new getCPtr() function which takes Java null and is public
// Make the pointer constructor public
%typemap(javabody) Farewell * %{
private long swigCPtr;
private transient long swigCPtr;
public $javaclassname(long cPtr, boolean bFutureUse) {
swigCPtr = cPtr;