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

[java] DataflowAnomalyAnalysis: DD false positive for arrays #1251

Open
cobratbq opened this Issue Jul 21, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@cobratbq
Contributor

cobratbq commented Jul 21, 2018

Affects PMD Version: pmd 6.5.0 executed through maven-pmd-plugin 3.8

Rule: DataflowAnomalyAnalysis (DD false positive)

Description:

The variable 'msg2', which is declared as an array of BigInteger, is treated like a plain variable being assigned multiple times, while in fact assignments are to specific indexes of the array.

Code Sample demonstrating the issue:

final BigInteger[] msg2 = new BigInteger[11];
msg2[0] = G1.modPow(x2, OtrCryptoEngine.MODULUS);
BigInteger[] res = proofKnowLog(x2, 3);
msg2[1] = res[0];
msg2[2] = res[1];
// etc.

Running PMD through: Maven

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