Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM cost reform

...

Code Block
bgColor#ccccff
BigInteger x = new BigInteger("530500452766");
String s = x.toString();  // validValid character data
byte[] byteArray = s.getBytes();
String ns = new String(byteArray);  
x = new BigInteger(ns); 

...

Encoding noncharacter data as a string is likely to result in a loss of data integrity.

Rule

Severity

Likelihood

Detectable

Remediation Cost

Repairable

Priority

Level

STR03-J

Low

Unlikely

Medium

No

No

P2

P1

L3

Related Guidelines

MITRE CWE

CWE-838, Inappropriate Encoding for Output Context

Bibliography

...


...

Image Modified Image Modified Image Modified