Skip to content
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

Doing math before serialization null pointer #2

Open
GoogleCodeExporter opened this issue Oct 1, 2015 · 0 comments
Open

Doing math before serialization null pointer #2

GoogleCodeExporter opened this issue Oct 1, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create EI (Encrypted Integer)
2. Multiply with another EI
3. writeObject (Serialize)
4. readObject (Deserialize)

What is the expected output?  Number multiplied together.

What do you see instead? Null pointer exception

The issue is the copy contructor is missing copying 'bigi' . . . I fixed it 
locally by adding this.bigi = other.bigi.  See modified constructor below:

        /**
         * Constructs a copy of the other encrypted integer
         * 
         * @param other the other encrypted integer
         */
        public EncryptedInteger(EncryptedInteger other) {
                this.rng = new SecureRandom();
                this.cipherval = other.getCipherVal();
                this.pub = other.getPublicKey();
                this.rngCons = other.rngCons;
                this.biCons = other.biCons;
                this.bigi = other.bigi; //new line
        }


What version of the product are you using?  Thep 0.2

On what operating system? Ubuntu


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Apr 2014 at 1:58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant