...
This noncompliant code example shows an example where the wrong type of character encoding is used with erroneous results.
| Code Block | ||
|---|---|---|
| ||
|
Compliant Solution
In this compliant solution ...
| Code Block | ||||
|---|---|---|---|---|
| ||||
Risk Assessment
If character data is not normalized before being passed to the NewStringUTF() function then erroneous results may be obtained.
Rule | Severity | Likelihood |
|---|
Detectable | Repairable | Priority | Level |
|---|---|---|---|
JNI04-J | Low | Probable |
No | No |
P2 | L3 |
Automated Detection
It may be possible to automatically detect whether character data from untrusted sources has been normalized before being passed to the NewStringUTF() function.
Bibliography
...
...