You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above is a line of Java code, which evidently contains two method calls: string concatenation and the substring method.
However, in the paths obtained through taint analysis, there is only a single call recorded.
After debugging, it was discovered that the call for string concatenation was retained, while the call to the substring method was not included in the traced path.
I originally thought that Joern wouldn't handle cases where there are multiple function calls in a single line of code, but in reality, Joern is able to handle the following code correctly.
s = s.substring(0).substring(0); // handled correctly
Then I tested the following code and found that Joern still loses some information, so I suspect this might be due to the string concatenation operation.
wooyune1
changed the title
[Bug]When a line of code uses string concatenation, the taint analysis results of this line of code lose some details.
[Javasrc2cpg]When a line of code uses string concatenation, the taint analysis results of this line of code lose some details.
Apr 5, 2024
Describe the bug
The above is a line of Java code, which evidently contains two method calls: string concatenation and the substring method.
However, in the paths obtained through taint analysis, there is only a single call recorded.
After debugging, it was discovered that the call for string concatenation was retained, while the call to the substring method was not included in the traced path.
I originally thought that Joern wouldn't handle cases where there are multiple function calls in a single line of code, but in reality, Joern is able to handle the following code correctly.
Then I tested the following code and found that Joern still loses some information, so I suspect this might be due to the string concatenation operation.
To Reproduce
A.java
TaintAnalysis.scala
Expected behavior
The line of code where the expected comments are added can find two method calls in the taint analysis.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: